Solved

FormatCurrency()

Posted on 2002-03-03
3
501 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 52

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

738 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