Using WildCards in IIF Statement

390 pts.
Tags:
Access query
IIF statement
Microsoft Access
SQL
Wildcards
Hi, I have a query that uses a field on a form to filter what information gets displayed. This is simple I know but what I need it to do is display all records if I don't enter anything in the field on the form. I tried putting the following IIF statement in the Criteria: IIf([Forms]![ContractPOSchedule]![PONoVar] Is Not Null,[Forms]![ContractPOSchedule]![PONoVar],([tblContractPOs].[ContractPO]) Like "*") If I enter something in the field on the form then it only displays those records but if the field is blank then nothing gets displayed. Do I have my syntax wrong in the IIF statement? Any help would be greatly appreciated. Dustin
ASKED: December 17, 2008  3:38 PM
UPDATED: December 17, 2008  9:27 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Instead of Is Not Null, try <>0

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following