Formatting for zero decimals


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
 
Ad

Advertisements

A

Allen Browne

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.)
 
Ad

Advertisements

C

CraigH

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.
 

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

Top