3 possible criteria in a query parameter (1 Viewer)

Angielah

Registered User.
Local time
Today, 09:42
Joined
Jul 9, 2002
Messages
11
I have a parameter query that is passed three possible options from a combo box. I have an iif statement to evaluate the criteria.
It goes a little something like this.....

iif([Forms]![frmWhatever]![combo]= "Choose sales","Sale", iif([Forms]![frmWhatever]![combo]= "Choose non-sales","Non-Sale","'Non-Sale'" & " Or " & "'Sale'"))

If "Choose sales" is selected , great!
If "Choose non-sales" is selected , great!

However I cannot get the query to select all records i.e sale and non-sale.

Would greatly appreciate any help.
 

Jon K

Registered User.
Local time
Today, 09:42
Joined
May 22, 2002
Messages
2,209
Try this in a new column in the query grid (replacing with the correct field name):-

Field: IIf([Forms]![frmWhatever]![combo]="Choose sales", [FieldName]="Sale", IIf([Forms]![frmWhatever]![combo]="Choose non-sales", [FieldName]="Non-Sale", True))

Show: uncheck

Criteria: <>False
 

Angielah

Registered User.
Local time
Today, 09:42
Joined
Jul 9, 2002
Messages
11
Thanks Jon K. You are my hero!! It worked beautifully!!
 

Users who are viewing this thread

Top Bottom