I've just played with a similar thing and have used
=IIf([Check33]),"Yes","No"
and that worked, when I tried Me.Check33 it didn't but [Forms]![frmOptions]![Check33] did.
Anyway I think the expression should be:
Hello all, please help me with this one. Whats wrong with this IIF.
(Form!F_Order.payment is a checkbox, [sum] is av value from database)
=IIF(([Form]![F_Order]![payment]),([sum]/3),"4000"
I have the sample if you want to see it!
Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
"syntaxerror in queryexpression 'First([IIF(([Forms]]![F_Order]![[payment]),[[sum]/3),"4000"])'"
What means with "First" and all these "[" and "]", excause me for my lack of experience with access but I´m learning everyday
Access doesn´t like the "=" in the begining of the string. And if I remove it Access generates a error like the one above (with the 'First...)
Does any IIf statement work?
Try to compile the project: open any module and go to Debug-Compile.
If no error occurs, type this i the Immediate Window:
?IIf("a"="a","match","no match"
It should return 'match'
Then try
?IIf("a"="b","match","no match"
It should return 'no match'
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.