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

Query : dynamic criteria

P: 48
Hi,

I have a query containing a numeric column on which a criteria is applied. The criteria-value is contained in a workfield/variable.

So far no problem.

Howver I would like to have the query not filtered at all when the workfield/variable contains null.

I tried several constructions, but can't find a way to let the query return all rows in that null-situation.

How could I do this ?

I tried the following criteria :

iif(isnull(workfield);Like "#";workfield)
iif(isnull(workfield);"";workfield)

without luck

Thanks
Mar 18 '08 #1
Share this Question
Share on Google+
2 Replies


Expert Mod 2.5K+
P: 2,545
Try Like Nz([workfield], "*") which will substitute the wildcard character (the asterisk, not the hash) if the workfield is null.

-Stewart
Mar 18 '08 #2

P: 48
Thanks !!!

Works marvellous, exactly what I was looking after !!

Regards
Mar 19 '08 #3

Post your reply

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