Qury linked to Form with empty value

ot070707

Registered User.
Local time
Today, 15:47
Joined
Jan 28, 2009
Messages
10
Hi,
I have created a query linked to combo boxes on a user input form with [forms]![inputform]![comboxx] as my criteria.
This works fine until one of the combo boxes referred to is empty.
In this case, I want to return all records, but the query returns no records at all.
I have tried using iif(isnull([forms] etc, but I can't get this to work.
Please can someone assist?
Regards,
Mark
 
Last edited:
Try the following as your criteria;
Code:
Like (IIf(IsNull([Forms]![FRM_FormName]![ComboName]),"*",[Forms]![FRM_FormName]![ComboName]))
 
....and here's a sample DB.
 

Attachments

Re: Query linked to Form with empty value

Thanks.
I've tried that but it still returns no records.
I have also tried using Like "*" as well as just "*" but that doesn't work either.
 
Didn't see that sorry.
I can't look at it at the moment due to my employer's firewall restrictions.
I'll have a good look tonight when I get home.
Many thanks.
Mark
 
Hallelujah!
I had a look at your attachment and I was missing the 'Like' at the beginning.
It now does exactly what I wanted.
Many thanks again.
Have a good weekend.
Mark
 

Users who are viewing this thread

Back
Top Bottom