BrokenBiker
ManicMechanic
- Local time
- Today, 17:57
- Joined
- Mar 22, 2006
- Messages
- 128
I have a query w/a calculated filed (TngDue). Some of those records have no date. When I use CDate to convert the TngDue field to a date format, the records w/o date entries give me an #Error.
I've tried to use IIf and IsNull to get rid of the #Errors and still maintain a date format, but am so far unsuccessful.
It seems that if I try to handle the null values to get rid of the #Errors, I have to live w/a text string. If I want a date value, I'll have to live w/the #Errors. Is there any way to handle null values w/a date field and still have the result as a date as opposed to a string?
I've tried to use IIf and IsNull to get rid of the #Errors and still maintain a date format, but am so far unsuccessful.
Code:
TngDueDate: IIf(IsNull([TngDue]),"",CDate([TngDue]))
It seems that if I try to handle the null values to get rid of the #Errors, I have to live w/a text string. If I want a date value, I'll have to live w/the #Errors. Is there any way to handle null values w/a date field and still have the result as a date as opposed to a string?