Iif statement =error in query

ppoindexter

Registered User.
Local time
Yesterday, 19:35
Joined
Dec 28, 2000
Messages
134
I have placed this Iif statement in the field line of a query

ref: Iif([fld_tplan_res_mat_id],1([fldreference] & " " & [fld_free_text] & " " & [fldpages])," ")

and am recieving this error

"may have entered an invalid identifier or typed () following the null contant"
 
There's a typo in there:
Iif([fld_tplan_res_mat_id],1([fldreference] & " " & [fld_free_text] & " " & [fldpages])," ")
 
sorry
i dont see the typo
 
The number 1 highlighted in red.
 
i guess i am missing something here, the 1 is the criteria ..if fld_tplan_res_mat_id is 1 then i want the string (that follows)

could it be i have the wrong syntax???
thanks for your help
 
Then perhaps this syntax would be what you need:
Iif([fld_tplan_res_mat_id]=1,([fldreference] & " " & [fld_free_text] & " " & [fldpages])," ")
 
ureka!! that was exactly what i needed....thanks so much!!
 

Users who are viewing this thread

Back
Top Bottom