Currency format with 2 decimals not showing on report

  • Thread starter Thread starter ckulow
  • Start date Start date
C

ckulow

Goal is to create a calculation for the MeetingFee field that results in a
blank field when MeetingFee is 0, but should display the MeetingFee in
currency format with 2 decimal places when its value is > 0.

This is the query I am using for this caluation:

MeetingFeeTxt: IIf([MeetingFee]>0,[MeetingFee],"")

Problem with my query is that I am loosing the currency format and the 2
decimal places when the MeetingFee value is greater than 0 and is displayed.

I tried to set the format of this field to currency in the query and in the
report. It is also defined as currency with 2 decimals in the table. No luck.

What am I doing wrong?

Thanks!
ckulow
 
Found solution: I created a text box in my form with ControlSource as the
field query below. That worked!
Never mind...
 
It looks like your IIf() could return a number or a string. I think this is
the wrong way to create expessions. I would try use:
MeetingFeeTxt: IIf([MeetingFee]>0,[MeetingFee],Null)
Also, in a text box, you can set the Format property to display "" if the
value of the text box is 0.

--
Duane Hookom
Microsoft Access MVP


ckulow said:
Found solution: I created a text box in my form with ControlSource as the
field query below. That worked!
Never mind...

ckulow said:
Goal is to create a calculation for the MeetingFee field that results in a
blank field when MeetingFee is 0, but should display the MeetingFee in
currency format with 2 decimal places when its value is > 0.

This is the query I am using for this caluation:

MeetingFeeTxt: IIf([MeetingFee]>0,[MeetingFee],"")

Problem with my query is that I am loosing the currency format and the 2
decimal places when the MeetingFee value is greater than 0 and is displayed.

I tried to set the format of this field to currency in the query and in the
report. It is also defined as currency with 2 decimals in the table. No luck.

What am I doing wrong?

Thanks!
ckulow
 
Back
Top