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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Complex(for me) IIf Statement 6
Aggregate Function Error 0
Qry replaces , with > when saved 2
Complicated IIf Statement Problem 24
IIF statement not working 4
IIf statements 2
error 3075 4
IIf [HasData] 2

Back
Top