Criteria in Report

Unicon

Registered User.
Local time
Tomorrow, 03:02
Joined
Dec 24, 2009
Messages
123
Dear all,

Please advice as I write down the criteria in report as below but is was telling that contains invalid syntax.

=IIf([M]=[M],DLookUp("[Total Cost]","Monthly Cost Query","[Month of]='January 2011'",IIf([M]=[M],DLookUp("[Total Cost]","Monthly Cost Query","[Month of]='February 2011'")"0"))

I may forgot something.:mad:
 
First of all, [M] = [M] doesn't really make sense. It's just like saying If 1 = 1, it will always be true.
 
The first DLookup function never has a closing parenthesis. It should be before the second IIf function.

I agree with above though, strange criteria.
 

Users who are viewing this thread

Back
Top Bottom