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

Need help with query condition using IIF and Like

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

Expert Mod 10K+
P: 12,441
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.