Test number of decimal places in Currency format

  • Thread starter Thread starter Bob Howard
  • Start date Start date
B

Bob Howard

How can I interrogate the system (Windows, I guess) to find out how many
decimal places are specified in its Currency format?

Alternatively, how can I test a number that's been entered to ensure that
the user did not enter more decimal places than the Windows currency format
permits (Access will store what's entered, but I want to reject what's been
entered if it's not according to the Regional settings).

Bob
 
Randy Birch has code to give you details about the defined Locale Currency
information at http://vbnet.mvps.org/code/locale/localecurrency.htm

Note, though, that Randy's site is aimed at VB programmers. There are
significant differences between the controls available for forms in VB and
in Access, so that Randy's examples ofter can't be ported directly to
Access. Unfortunately, this is one such example: he's using a control array
to create the text boxes on the form, which changes how you refer to them.

Hopefully, though, it'll be obvious what you need to change to get it to
work in Access.
 
Back
Top