IIf Syntax or Location

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey All,
I am having a little trouble with this IIF expression-- IIf([PFS 1]=0,("
"),[PFS 1]) --placed into the control source text box of a report. Displays
warning: Syntax error (comma) in query expression. Also tried IIf([PFS
1]>0,(" "),[PFS 1]). Please let me know what you think and thank you in
advance. Adam
 
Hi -- Remember the IIf format: IIf(Expression, true part, false part). Try
this:

IIf([PFS 1]=0," ",[PFS 1])

Just to be clear, are you trying to display a blank if PFS 1 is zero and the
value otherwise?
 
Yes that is what I was after. I'm not sure why I thought the parens had to be
there. Thank you for you time. Adam

xRoachx said:
Hi -- Remember the IIf format: IIf(Expression, true part, false part). Try
this:

IIf([PFS 1]=0," ",[PFS 1])

Just to be clear, are you trying to display a blank if PFS 1 is zero and the
value otherwise?

F1stman said:
Hey All,
I am having a little trouble with this IIF expression-- IIf([PFS 1]=0,("
"),[PFS 1]) --placed into the control source text box of a report. Displays
warning: Syntax error (comma) in query expression. Also tried IIf([PFS
1]>0,(" "),[PFS 1]). Please let me know what you think and thank you in
advance. Adam
 
No problem; glad I could help.

F1stman said:
Yes that is what I was after. I'm not sure why I thought the parens had to be
there. Thank you for you time. Adam

xRoachx said:
Hi -- Remember the IIf format: IIf(Expression, true part, false part). Try
this:

IIf([PFS 1]=0," ",[PFS 1])

Just to be clear, are you trying to display a blank if PFS 1 is zero and the
value otherwise?

F1stman said:
Hey All,
I am having a little trouble with this IIF expression-- IIf([PFS 1]=0,("
"),[PFS 1]) --placed into the control source text box of a report. Displays
warning: Syntax error (comma) in query expression. Also tried IIf([PFS
1]>0,(" "),[PFS 1]). Please let me know what you think and thank you in
advance. Adam
 
Back
Top