SmartestIdiot
New member
- Local time
- Today, 17:53
- Joined
- Dec 10, 2013
- Messages
- 4
I have a problem getting the value of an IIF function that produces a DateDiff. Instead I'm getting numbers stored as text, and when I try to sort the report, the numbers are all over the place.
I tried the Val function on the DateDiff, but this only produce #Errors in certain fields. That's because not records have a date in them.
The field is suppose to produce a countdown of days until the report is late, but only if the Received_Date is blank. Otherwise nothing. Also not everyone has a Duedate, that's whats causing the #Error.
Original report that produces numbers as text.
Late_Report: IIf(IsNull([Received_Date]),DateDiff("d",[Due_Date],Date()-14),"")
Attempt to get values which produces #Error
Late_S1: IIf(IsNull([STATUS_DT]),Val(DateDiff("d",[CURRENT_THRU],Date())-14),"")
I was thinking of just producing another query and working off of that instead. I would like to know the answer though, if there is one. Thanks.
I tried the Val function on the DateDiff, but this only produce #Errors in certain fields. That's because not records have a date in them.
The field is suppose to produce a countdown of days until the report is late, but only if the Received_Date is blank. Otherwise nothing. Also not everyone has a Duedate, that's whats causing the #Error.
Original report that produces numbers as text.
Late_Report: IIf(IsNull([Received_Date]),DateDiff("d",[Due_Date],Date()-14),"")
Attempt to get values which produces #Error
Late_S1: IIf(IsNull([STATUS_DT]),Val(DateDiff("d",[CURRENT_THRU],Date())-14),"")
I was thinking of just producing another query and working off of that instead. I would like to know the answer though, if there is one. Thanks.