Format Currency

J

Jason

I am using Access 97 with VBA. I am trying to format a
variable to show currency with commas. This what I am
using and it is not working:

Freight = Format(x, "#,###,#00.00")

Please Help
 
D

Dirk Goldgar

Jason said:
I am using Access 97 with VBA. I am trying to format a
variable to show currency with commas. This what I am
using and it is not working:

Freight = Format(x, "#,###,#00.00")

Please Help

In what way isn't it working? What's the definition of Freight and of
x? Any special reason you aren't using the "currency" format string?
 
T

Tim Ferguson

I am trying to format a
variable to show currency with commas. This what I am
using and it is not working:

Freight = Format(x, "#,###,#00.00")

It helps if you give some indication of datatypes: Freight should be a
string and x should be a numeric. I notice that you have not put any
currency characters in this either;-

strFreight = Format(currX, "$#,#00.00")

or the equivalent (as Dirk suggests)

strFreight = Format(currX, "Currency")

B Wishes


Tim F
 

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