Currency format with IIF statement

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

Guest

I have the following code which works great except I want [FPIH] to be
formatted in currency, but am having trouble with this.
=IIf([FPI]>0,"Principal Field Archaeologist " & [FPI] & " for a total of "
& [FPIH],Null)
Thanks in advance. Paul
 
When I add that to the expression
=IIf([FPI]>0,"Report Archaeologist " & [FPI] & " for a total of " &
Format[FPIH],"Currency",Null)
I get and error message that states I have an invalid syntax.
Thanks in advance for the helpl
Paul

Duane Hookom said:
Rather than [FPIH], use Format([FPIH],"Currency").

--
Duane Hookom
MS Access MVP


pas926 said:
I have the following code which works great except I want [FPIH] to be
formatted in currency, but am having trouble with this.
=IIf([FPI]>0,"Principal Field Archaeologist " & [FPI] & " for a total of
"
& [FPIH],Null)
Thanks in advance. Paul
 
If your syntax is as you have described in your message I would expect to
get an error. You forgot the ()s.

=IIf([FPI]>0,"Report Archaeologist " & [FPI] & " for a total of " &
Format([FPIH],"Currency"),Null)

--
Duane Hookom
MS Access MVP
--

pas926 said:
When I add that to the expression
=IIf([FPI]>0,"Report Archaeologist " & [FPI] & " for a total of " &
Format[FPIH],"Currency",Null)
I get and error message that states I have an invalid syntax.
Thanks in advance for the helpl
Paul

Duane Hookom said:
Rather than [FPIH], use Format([FPIH],"Currency").

--
Duane Hookom
MS Access MVP


pas926 said:
I have the following code which works great except I want [FPIH] to be
formatted in currency, but am having trouble with this.
=IIf([FPI]>0,"Principal Field Archaeologist " & [FPI] & " for a total
of
"
& [FPIH],Null)
Thanks in advance. Paul
 
Thanks it worked great,!!!

Duane Hookom said:
If your syntax is as you have described in your message I would expect to
get an error. You forgot the ()s.

=IIf([FPI]>0,"Report Archaeologist " & [FPI] & " for a total of " &
Format([FPIH],"Currency"),Null)

--
Duane Hookom
MS Access MVP
--

pas926 said:
When I add that to the expression
=IIf([FPI]>0,"Report Archaeologist " & [FPI] & " for a total of " &
Format[FPIH],"Currency",Null)
I get and error message that states I have an invalid syntax.
Thanks in advance for the helpl
Paul

Duane Hookom said:
Rather than [FPIH], use Format([FPIH],"Currency").

--
Duane Hookom
MS Access MVP


I have the following code which works great except I want [FPIH] to be
formatted in currency, but am having trouble with this.
=IIf([FPI]>0,"Principal Field Archaeologist " & [FPI] & " for a total
of
"
& [FPIH],Null)
Thanks in advance. Paul
 
Back
Top