If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
#ERROR Message
I have code in a report text box that works great.
Just one problem, If the field or fields is missing or doesn't have data the function will display and annoying "#Error" message. How can I just display a blank or "N/A" Message instead. Thanks all diff2dates("hn",CDate([rec Dte] & " " & [rec time]),CDate(Date() & " " & Time())) |
#2
|
|||
|
|||
#ERROR Message
Test to see if the field or fields is null
IIF(IsNull([Rec Dte]),"N/A", diff2dates("hn",CDate([rec Dte] & " " & [rec time]),CDate(Date() & " " & Time()))) If you need to check both then IIF(IsNull([Rec Dte]) or IsNull([rec time]), ...,...) "bladelock" wrote in message ... I have code in a report text box that works great. Just one problem, If the field or fields is missing or doesn't have data the function will display and annoying "#Error" message. How can I just display a blank or "N/A" Message instead. Thanks all diff2dates("hn",CDate([rec Dte] & " " & [rec time]),CDate(Date() & " " & Time())) |
#3
|
|||
|
|||
#ERROR Message
This works fine if Rec dte or Rec dte are blank, but #Error appears if no
records meet the query. How do I control the message when no records are found for this query in the report? Thanks for your help Mr. Spencer "John Spencer" wrote: Test to see if the field or fields is null IIF(IsNull([Rec Dte]),"N/A", diff2dates("hn",CDate([rec Dte] & " " & [rec time]),CDate(Date() & " " & Time()))) If you need to check both then IIF(IsNull([Rec Dte]) or IsNull([rec time]), ...,...) "bladelock" wrote in message ... I have code in a report text box that works great. Just one problem, If the field or fields is missing or doesn't have data the function will display and annoying "#Error" message. How can I just display a blank or "N/A" Message instead. Thanks all diff2dates("hn",CDate([rec Dte] & " " & [rec time]),CDate(Date() & " " & Time())) |
Thread Tools | |
Display Modes | |
|
|