Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Currency Symbols`

Status
Not open for further replies.

primagic

IS-IT--Management
Jul 24, 2008
476
GB
Is there a way using vba that I can change the currency symbol of a currency field on a form. My regional settings are set to £ however, I have a field where the user can select a currency. So if they select US Dollars then the £ symbol will change to a $ and likewise if they chose Japanese Yen then the symbol will change to a ¥ symbol

Help please

Thanks
 
You can set the format of a textbox like so: $#,##0.0, however, this will not help with regions that use comma for decimal separator and so forth. It seems to me that it is likely that a person will be choosing the currency that relates to the region the PC is in, is this not so?

 
What the form is. we have people who make investments in different currencies. So when they are adding an investment, because we are in the UK default currency and format will be pounds. But if they make a US investment, then the field will display a $ instead of a £. But not change the region. Region default will always be UK.

So they type in an amount, then select a currency and I want the field to format appropiately
 
So it is really just the symbol you want, in that case you can format the textbox according to the currency field in you table using the current event, say.

 
Buliding on Remou post I want to add that then Format Function takes a String Pramater. Why don't you bulid a table with each currency and its format and in the on current event set the format of the text box
Code:
me.textbox.format=dlookup("currencyFormat","Formattable","currencytype=" & me.currencytype)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top