Brian, thanks for the response. By changing to 1 my iff statement stopped working all together. right now it is working it is just adding #error to the yes piece
The DocTypeID field is not in the query. If I add it, I notice that the only records that have a value there are the ones with a date in the other field. The others are Null. This gets rid of the error:
Expr3: IIf(nz([DocTypeID],"")="1" And IsNull([documentreceived]),"N","Y")
but all records are "Y", because the 2 conditions are never met.
I am sure this has something to do with the fact that it is a date field with a valid date in it that produces the #error. Am I asking the expression to change a date value to a string value?
I don't understand what you are saying. The database I sent has dates in the documentsreceived field. When I run the query it does not return all dates. I can see which fields have dates and which do not. The docid is not null it just is not being displayed in the query.
When I run this query I see the field documentreceived with the records that have dates and records that do not. Exp3 shows me an N for those records without the dates, therefore that piece is correct. But it shows me #Error for those records with a date.
I just do not understand what you are saying. The query seems to be working with the exception of not returning a Y but instead returning a #error
Thank you for the feedback, I'm glad you have resolved your problem, which was as I started to suspect a different one to that which we were originally addressing our efforts.