Test number of decimal places in Currency format

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
 
D

Douglas J. Steele

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top