Blank date field default on query criteria

Stacey

Registered User.
Local time
Yesterday, 19:05
Joined
Sep 10, 2002
Messages
84
Hello.

I have a query that is pulling data based on a date in a table. For some records, that date field is empty. For those records, the data should be pulled based on the date of 1/1/06. I tried doing this
=IIf([Signed SLA Received] Is Null,1/1/06,>=[Signed SLA Received])

It doesn't like this at all, it brings back no data. I also tried putting 1/1/06 in quotes, but it didn't make any difference.

This is probably a totally incorrect way to get this done, but I don't know how else to try it.

Thanks!
Stacey
 
Last edited:
Try:

=IIf([Signed SLA Received] Is Null,#1/1/06#,>=[Signed SLA Received])
 
Thank you for responding. It tried putting the #"s in there and it's still giving me no data.

Maybe I should explain a little more.
The field the criteria is in is called Release_Date. I want the criteria to be pulled from a different table (but that table is part of the query) from the "Signed SLA Received" field. If that field is blank, I want it to use 1/1/06.

I didn't know if it makes a difference that the field data is being pulled for isn't the field I'm pulling criteria from. If I just use >=Signed SLA Received in the criteria field, I get data back. But when I add the IIF function, it stops bringing back data.

Thanks!
 
=IIF(IsNull([Signed SLA Received]),#1/1/2006#,[Signed SLA Received])

Not sure what you're trying to do with the >= but if it's a criterion then it belongs in the criteria row of the query design grid, not in the iif itself.
 

Users who are viewing this thread

Back
Top Bottom