3 possible criteria in a query parameter

Angielah

Registered User.
Local time
Today, 00:14
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.
 
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
 
Thanks Jon K. You are my hero!! It worked beautifully!!
 

Users who are viewing this thread

Back
Top Bottom