Query Criteria arrgggg

G

Guest

Hello all,

I have a form with a query bound to it.

On the form I have a combo box, which has a list of values from a table.

Basically, if the combo box reads " [All]" then I want to view all records,
otherwise view only that retailer.

In the query I have the following criteria in the retailer field:

IIf([Forms]![Audit frm]![RetSelect]=" [All]",Not Null,[Forms]![Audit
frm]![RetSelect])

If isn't working and I really don't know why, I've tried loads of different
ways.

Can someone please help me !!
 
O

OfficeDev18 via AccessMonster.com

Adam,

I think you need to add an "=" sign at the very start, and the word "Is" in
the middle, as in

=IIf([Forms]![Audit frm]![RetSelect]=" [All]",Is Not Null,[Forms]![Audit frm]
![RetSelect])

Hope this helps,

Sam
Hello all,

I have a form with a query bound to it.

On the form I have a combo box, which has a list of values from a table.

Basically, if the combo box reads " [All]" then I want to view all records,
otherwise view only that retailer.

In the query I have the following criteria in the retailer field:

IIf([Forms]![Audit frm]![RetSelect]=" [All]",Not Null,[Forms]![Audit
frm]![RetSelect])

If isn't working and I really don't know why, I've tried loads of different
ways.

Can someone please help me !!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top