A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

custom currency symbol independent of regional settings



 
 
Thread Tools Display Modes
  #1  
Old February 5th, 2010, 07:23 AM posted to microsoft.public.access.forms
CodeCola
external usenet poster
 
Posts: 1
Default custom currency symbol independent of regional settings

preamble: The database I am working on is based on many companies each having
its own home/base currency. Moreover, a user can be logged into two company
sessions on the same computer at the same time, one having $ and the other
having euro as the base currency in the respective sessions. The database
system must now create new companies with indonesian and middle eastern
currencies. I need to attack the problem of currency symbols independent of
the regional settings using code and work arounds perhaps.

outcome sought: the ability to format values in the controlsource property
whilst retaining the output as a number and not a string. The following
produces a string which stops all further calculations.

#1. controlsource string for textbox text1:
=Format([text1], "\R\p#,##0.00;-\R\p#,##0.00")

#2. text1.format = "\R\p#,##0.00;-\R\p#,##0.00" --- when the textbox's
format property is targeted, the textbox's value retains its numberic
characteristic and can be used in calculations.

BUT when the controlsouce (as in #1. above) is formated with a literal
other than a $ or EURO (ie if it is not currently selected in the regional
settings) then the output is a string and further calculations are not
possible.

Before I started work on the database, a lot of reports and textbox
controlsources had been formatted for currency. The problem is that
formatting in the controlsource overrides any changes in the format property.

Is there a way to get the format function to understand that the literal
symbols used for currency are indeed currency symbols and therefore not
convert the output to a string. Using functions like mid and val to extract
the currency symbols and use the number part for calculations is not an
option.

Alternatively can one leave the format Property as "Currency" and change
the currency symbol used by Access. Is there something like Access's own
locale which may be set to the operating system's locale or stay independent
of it.

Any other line of thinking is welcome in order to achieve currency
formatting outside the format property and have the resulting output retain
it's numeric characteristic without any post-processing needed for it to be
so.
  #2  
Old February 5th, 2010, 01:59 PM posted to microsoft.public.access.forms
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default custom currency symbol independent of regional settings

On Thu, 4 Feb 2010 23:23:01 -0800, CodeCola
wrote:

I might have two currency fields: only to show for human consumption,
and another one (perhaps hidden) with the same value to use for
calculations.

-Tom.
Microsoft Access MVP


preamble: The database I am working on is based on many companies each having
its own home/base currency. Moreover, a user can be logged into two company
sessions on the same computer at the same time, one having $ and the other
having euro as the base currency in the respective sessions. The database
system must now create new companies with indonesian and middle eastern
currencies. I need to attack the problem of currency symbols independent of
the regional settings using code and work arounds perhaps.

outcome sought: the ability to format values in the controlsource property
whilst retaining the output as a number and not a string. The following
produces a string which stops all further calculations.

#1. controlsource string for textbox text1:
=Format([text1], "\R\p#,##0.00;-\R\p#,##0.00")

#2. text1.format = "\R\p#,##0.00;-\R\p#,##0.00" --- when the textbox's
format property is targeted, the textbox's value retains its numberic
characteristic and can be used in calculations.

BUT when the controlsouce (as in #1. above) is formated with a literal
other than a $ or EURO (ie if it is not currently selected in the regional
settings) then the output is a string and further calculations are not
possible.

Before I started work on the database, a lot of reports and textbox
controlsources had been formatted for currency. The problem is that
formatting in the controlsource overrides any changes in the format property.

Is there a way to get the format function to understand that the literal
symbols used for currency are indeed currency symbols and therefore not
convert the output to a string. Using functions like mid and val to extract
the currency symbols and use the number part for calculations is not an
option.

Alternatively can one leave the format Property as "Currency" and change
the currency symbol used by Access. Is there something like Access's own
locale which may be set to the operating system's locale or stay independent
of it.

Any other line of thinking is welcome in order to achieve currency
formatting outside the format property and have the resulting output retain
it's numeric characteristic without any post-processing needed for it to be
so.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.