Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Criteria Expression Question

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I want the Criteria portion of a row in Query to say "if XX is not null, then match to XX, otherwise match all" (imagine XX is a data item thats being fed to the query)

My expression right now looks like this:

IIf(XX & " Is Not Null",XX,Is Not Null)

it only works when XX isn't null because otherwise I guess it returns a String "Is Not Null", as opposed to the actual function. Is there something I can put a string that would match all data?

Otherwise, any suggestions would be appreciated.

Thanks
 
Regretfully that doesn't work. I think Access tries to actually match with a row that has the character * as its data.
 
Regretfully that doesn't work. I think Access tries to actually match with a row that has the character * as its data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top