By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,080 Members | 1,817 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,080 IT Pros & Developers. It's quick & easy.

Need help with query condition using IIF and Like

100+
P: 176
Hello all.

I'm currently writting a query that would be able to filter a table by a form's control value. If the value is null, the query should select all the rows of the table.

The condition I came up with is:
IIf(IsNull([Forms]![printqry]![farea]),Like "*",[Forms]![printqry]![farea])

It filters the data correctly when Forms!printqry!farea has a value, howerever it doesn't choose anything when Forms!printqry!farea value is null.

What is the correct syntax to do it?

Thanks, Michael.
Jun 7 '07 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,366
Like IIf(IsNull([Forms]![printqry]![farea]),"*",[Forms]![printqry]![farea])
Jun 7 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.