Solved

FormatCurrency()

Posted on 2002-03-03
3
499 Views
Last Modified: 2012-05-04
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?
0
Comment
Question by:eeevbeee
3 Comments
 
LVL 54

Accepted Solution

by:
nico5038 earned 25 total points
ID: 6837933
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
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 6838220
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
 

Expert Comment

by:samphi
ID: 6839085
You can use CCur...

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

That use the "regional setting"

Good Luck!
Phil.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question