SQL Statement - Filter

T

Tony

Good Afternoon,

I have an SQL statement that pulls inventory within a
form and I have added a check box to give the user the
ability of pulling only "Active" status inventory or,
when it is un-checked I would like it to pull ALL.
Currently it works for the Active (checked = -1) but when
its unchecked it returns nothing. Here is my criteria:

IIf([Forms]![frmPCodeSearch]![Active]=-1,"Active",IIf
([Forms]![frmPCodeSearch]![Active]=0,""))

The possible statuses could be Active, Inactive,
Suspended or Reserve. How do you pass more than one
possible status (i.e. Active, Inactive, ect) when
[Active] = 0. Any help would be much appreciated.

Thanks.

Tony
 
T

tina

how about

IIf([Forms]![frmPCodeSearch]![Active]=-1,"Active",IIf
([Forms]![frmPCodeSearch]![Active]=0, Like "*"))

hth
 

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