FormatCurrency()

This function is listed with the other Format(), but when I try to use the FormatCurrency in a Query, or Report I get only errors, as though it does not recognize this Function. Is this documented  somewhere? What's up with the FormatCurrency?
eeevbeeeAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
nico5038Connect With a Mentor Commented:
Just type the command under VBA and press F1 for the syntax.

The query indeed doesn't accept the function. (Guess M$ made a mistake)

I used a workaroud by creating a function in the modules section like:

Function fncFormatcurrency(strCurr As Currency)

fncFormatcurrency = FormatCurrency(strCurr, 2)

End Function

And the query:

SELECT fncFormatcurrency([UnitPrice]) AS Pr
FROM Products;

What will supply the wanted format.....

Nic;o)
0
 
Ryan ChongCommented:
or you can directly using Format like this to show Currency in Format you want:

SELECT Format([UnitPrice],"##,##0.00") AS Pr
FROM Products;
0
 
samphiCommented:
You can use CCur...

"Where salary = ccur(""" & Format$(MyCurrencyValue) & """)"

That use the "regional setting"

Good Luck!
Phil.
0
All Courses

From novice to tech pro — start learning today.