Formatting for zero decimals

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

Hello, I'm using Access 2003 and trying to combine 2 fields, One value is
10000 and the other is bags and I want to display "10,000 bags"

I have put this into the code of the report but I still need to format the
value to not show decimal points, anyone know how to do this. Currently it
show "10,000.00 bags"
Me.txtFieldC = CStr(VBA.Format(Me.txtFieldA, "Standard")) & " " & Me.txtFieldB

Thanks
 
Try a text box with Control Source of:
=Format([txtFieldA], "#,##0") & " " & [txtFieldB]

IMHO, it would be much better to just display this, rather than to store it
in txtFieldC.

(Assumed the quantity will never be negative.)
 
Inline

Allen Browne said:
Try a text box with Control Source of:
=Format([txtFieldA], "#,##0") & " " & [txtFieldB]

IMHO, it would be much better to just display this, rather than to store it
in txtFieldC.

He is displaying - (as far as what was written)
(Assumed the quantity will never be negative.)

Report and not table.

The txt should have been the clue :) - Usually txt goes in front of a text
box and not a field name.
 
Back
Top