Query filter from combo box also has IIF statement

elfranzen

Registered User.
Local time
Today, 10:05
Joined
Jul 26, 2007
Messages
93
Here is what I have in my Query
IIf([Forms]![Report Form]![Combo56]=0,1 or 3,[Forms]![Report Form]![Combo56])

in the combo box I have it setup like this
Yes = 1
No = 3
All = 0

it is pulling for a SQL database and what I am looking to do is if they want them all select 1 and 3 but when I save the Query is changes it to this and doesn't work.

IIf([Forms]![Report Form]![Combo56]=0,([BigAssQuery MTD].[Calc_ID])=1 Or ([BigAssQuery MTD].[Calc_ID])=3,[Forms]![Report Form]![Combo56])

what Am I doing wrong here:banghead:
 
If all you need is to select from a Group of possibilities, then using the IN() function could be what you need.

IIf([Forms]![Report Form]![Combo56] IN (0, 1, 3),[Forms]![Report Form]![Combo56])
 
while I was waiting I was still trying things and this is what I came up with that worked

in the combo box all = *
then i put Like [forms]![report form]![combo58]

that way it would just return the wildcard and select them both.
 

Users who are viewing this thread

Back
Top Bottom