correction please.

shutzy

Registered User.
Local time
Today, 04:36
Joined
Sep 14, 2011
Messages
775
i have a query that has criteria. i want the criteria to be if the check box=true then include 1 and 2 and 3 and 4 and 5 and 6 and 7 etc, if false then include [forms]![rpttreatmentcount]![employees]

i thought that the Iif expression would do it but it returned a blank in the query.

can anyone tell me if this is not correct and a possible correction.

IIf([Forms]![rptReportsMainScreen]![All Empoloyees]=Yes,1 And 2 And 3 And 4 And 5,[forms]![rptReportsMainScreen]![Employee])

thanks
 
I wonder whether the following part of your criteria is incorrect?

1 And 2 And 3 And 4 And 5

Depending on what each of these Values 1,2,3,4,5 actually represent (please advise) then you appear to asking the Query to return records with values matching ALL of the five values rather than just ONE of them?
 

Users who are viewing this thread

Back
Top Bottom