Test number of decimal places in Currency format

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).


8/20/2007 4:19:23 AM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 40

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.

Doug Steele, Microsoft Access MVP
(no e-mails, please!)

"Bob Howard" <info@churchtrax.com> wrote in message 
> 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

8/20/2007 11:42:08 AM

Similar Artilces:

I'm pretty new to SQL and am a little confused as to which field type I should use to store my 'currency' type data. What's the main difference between these two data types and which would best fit the purpose? I want to store signed numerical data with up to 6 decimal places. Thanks in advance for any help. DECIMAL is an exact numeric, whereas DOUBLE is approximate - which means that whilst you can store e.g. 1.234567 in a decimal and it's equal to 1.234567, for a double this may be stored as 1.23456699999999. Doubles can cause grief with compari...

too many different formatting cells
I can't open an excel document because whem I try to open it says that too many different formatting cells. How to resolve this and open this document? Maybe... XL: Error Message: Too Many Different Cell Formats http://support.microsoft.com/default.aspx?scid=213904 A few people have said that OpenOffice.Org has been able to open the file. Then they clean it up and save it there. Then excel can open that cleaned up version. http://www.openoffice.org, a 60-104 meg download or a CD jo wrote: > > I can't open an excel document because whem I try to open it says that too >...

Conditional Formatting #18
I am attempting to use the conditional formatting to color code some cells, I want to say, If C1 = 0 then highlight A1 in red, how would I do that. Thanks Michelle 1st: select "Formula Is" instead of "Cell Value Is" in the left dropdown. The rest of the line changes to one long textbox. Enter "=$C$1=0" (no quotes) then select your format style from "format" button and "color" dropdown. that should do it. >-----Original Message----- > >I am attempting to use the conditional formatting to color >code some cells, I wan...

Conditional formating #7
Need help figuring out a formula please. If "date entered" in cell exceedes todays date by 4 days, then format the cell background "Red". Thanks so much for any help you can give. -- Unplugged ------------------------------------------------------------------------ Unplugged's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=36751 View this thread: http://www.excelforum.com/showthread.php?threadid=564685 Use a formula of =A2>=TODYA()+4 where A2 is assumed as the first cell with CF "Unplugged" <Unplugged.2bi5mq_1153833004...

conditional formating in Access
how to use Max funciton for conditional formating in Access form On Fri, 7 Mar 2008 01:43:00 -0800, sudyl wrote: > how to use Max funciton for conditional formating in Access form Max of What? Select the control. Click on Format + Conditional Formatting. Select Expression Is As the expression write: [ThisControlName] = Max([ThisControlName]) Select the colors wanted. Save the change -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail ...

Complicated conditional formatting
Here's a breakdown of what I'm trying to do...Employee scheduling worksheet that is easy to read and follow. There are 5 functions employees can have, each given a specific color via conditional formatting. Each column represents a period of time during the work day, each row a different employee. As it stands now, for the duration that the employee will work, I simply enter a 1, 2, 3, 4, or 5 corresponding to their function, and it will color each cell with that value. The problem I run into, is in a separate sheet, I'm wanting to use conditional formatting to apply the same c...

How to keep display format when exporting XML?
First thank you for taking the time to read about my problem. My problem is this. When exporting my xml data, the time/date values loose their display format. A time of 01:30 am, for example, becomes something like 0.001353 when exported.. What do I need to do to keep the same format as is displayed in Excel? It would sure be great if you could help. Kind regards ...

Printing odd pages in booklet format
I used to be able to do this easily in PageMaker, but I can't figure it out for the life of me in Publisher... I am creating a booklet. Each page is 8.5 w and 5.5 tall (ie, half-letter, landscape orientation). I'd like to print this booklet two pages to one peice of paper, so I can cut in the middle and punch for a ring binder. I'd like the target paper to be letter (8.5 x 11). However, when I try to set it up as a book, I get a weird page that's 17x5.5. How can I change how the page is set up, so I can get both 8.5 x 5.5 pages to print in the correct orientation on the...

How to convert US date format to European
My computer is set up to use the European style dates (ddmmyyyy), not the USA-style dates (mmddyyyy format). So if I enter "01/06/05" I get a date of 01-June-2005. However when I download some information in CSV format at times that same date is formatted like this: "06/01/05". However this is interpreted as 06-January-2005 in the spreadsheet. How can I convert the US formatted values to European, in effect swapping the first two numbers? Thanks T Meisner -- 1025 Osborne Rd., New Germany, NS, Canada B0R 1E0 Rename the .csv file to .txt File|open that .txt file...

Conditional Formatting 12-16-09
Hello, with a text entry containing 2 different fonts, like "?" (Font Symbol), then "Customers" (Font Arial), Conditional Formatting seems to apply only to the first font element (?) whereas the second element remains untouched by CF. Is there a workaround (so that the entry "? Customers" as a whole undergoes CF) ? Thank you in advance. H.G. Lamy ...

Date format of 0 and if statements
I have an is statment as such: =IF('Raw Data'!A5=0,,'Raw Data'!A5) This issue I have is when I format fields as "date" and the reference cell = 0 excel formates the cell as 01/00/00. I have also used the formula: =IF('Raw Data'!A5=0,"",'Raw Data'!A5) The issue I have is I want to create graphs of this data in a dynamic fashion, but when the data range of the graph encounters either "" or 1/00/00 as a date, it plots it as a data point. I need a way to make my IF statment to produce a BLANK or EMPTY cell. Is there a key word in...

2 Formatting Questions
Date Fields: Can we, in the CRM forms, format dates to read into the “15 Aug 2005” format? This is possible in reports, but by default, the forms use only numbers for dates, but in any format. Currency: Any ideas of how to track multiple currencies in the same application - specifically USD and Canadian? I know a Microsoft CRM installation currently supports one language. But aside from using a picklist to specify "USD", "CAN", "MEX", or other I'm concerned about how their forecasting. -- Carroll Little Vis.align, LLC 610-692-3290 x3326 www.visalign.c...

Odd Looking Number
Hi I am using a spreadsheet in Excel 2002 on Windows XP, for some reason the account numbers (which someone input, along with addresses) have a little green mark in the corner of the cell. I thought it was to show that there is a comment, but it is not. When you click on the cell, a little warning sign shows, saying ERROR - number in this cell formatted as text or preceded by an apostrophe. When I click on the arrow by the warning sign, it says Number stored as text Convert to number Ignore error Edit in formula bar Error checking options Show formula in audinting toolbar Now I l...

when I type a long number it shows up as smaller number and +
when converting from xls to csv format, some of my longer mortgage numbers get condensed into a smaller number with a letter, a plus sign and another number. example: 100020013120 turns into 1.0002E+11. Any way to get rid of this? Thanks, Yes, just specify the format that you want. Format Cells...>Number>0 decimal places Regards, Fred "SandyC" <SandyC@discussions.microsoft.com> wrote in message news:FA52E426-360E-4BE5-B63B-1209E673CA65@microsoft.com... > when converting from xls to csv format, some of my longer mortgage numbers > get conde...

Numbers turn red when equals to 0
Good day, Im monitoring our stock inventory using excel, i just want to know if I can make a certain cell turn red if my inventory is >5 or equal to zero.? Thanks -- shiela21cute ------------------------------------------------------------------------ shiela21cute's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=33169 View this thread: http://www.excelforum.com/showthread.php?threadid=529926 Check out Conditional formatting Ed -- EdMac ------------------------------------------------------------------------ EdMac's Profile: http://www.excelforum...

Setting random number range based on query, not table
I have a "quiz" form that randomly pulls up questions from my table. It works fine, and I don't mind that it repeats questions. This allows me to sit and review for as long as I want. The problem is, that I want to use criteria in a query to limit the available questions. If I base this form on a query and limit the number of questions, the code I am using is still setting the maximum number as the number of records in my table. In the past, I had a similar database (which I have lost) that would open the form, set the selector to the last record available to the form,...

Serial number error in sales order entry window (2nd post)
I'm reposting this because there was no response to my first post. I'm sure I'm not the only one that has had this problem. I noticed that one of my coworkers invoiced and added (overided) a serial number into the Great Plains instead of allocating one of the existing ones. How do I return this serial number w/out affecting my inventory? I need to: 1. Return the item w/the wrong serial number. 2. Reinvoice the correct serial number. 3. NOT HAVE THE WRONG SERIAL NUMBER STUCK IN MY INVENTORY. How do I do this? Hi Paoakalani Try looking at Serial Number edit, by Blue Moon...

Conditional Formatting
Hello all, I have a spreadsheet with 79,000 cells of information in rows and columns. On a separate worksheet I have 5,000 cells of information. I would like any information in the first sheet that is in the second sheet to turn to red. For example. Sheet1, column A hellothere howareyou iamfine Sheet2, column A hellothere iamfine I would like the two strings in sheet one which appear in sheet 2 to turn red, leaving the middle string black. Is there a way to do a lookup to compare the cell value to a range using conditional formatting? Thanks for any help. Mxx -- murphyz -----...

Using IF for conditional formatting?
Need help with displaying blank cells when formulas are inside. The formulas would display a value if the contents of a source cell is filled in. I'm attempting to use in the formula cells(like B2): IF(A2="","",A2*5) If A2 is null, then display blank in B2, else calculate A2 * 5. Is this the best approach to keeping formula cells clear until data is entered? Thanks!!!! Yes -- For everyone's benefit keep the discussion in the newsgroup. Regards, Peo Sjoblom "Barb" <anonymous@discussions.microsoft.com> wrote in message news:fd0201c4...

Conditional formating #20
I need help with conditional formating. I need Row 30 to change colour when D30 is equal to a certain value. A the moment i can only get the one cell to change colour :rolleyes -- smith.james ----------------------------------------------------------------------- smith.james0's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1623 View this thread: http://www.excelforum.com/showthread.php?threadid=39022 Select the row. Enter: CF1: Formula is =$D30 = "certain value" Format1: Patterns/<changed color> In article <smith.james0.1ssb2d...

Text box and formatting?
I am working on class schedule and have one text box which spans a few pages. Pages are double columns. I have a header for each class and paragraph given for class description. On the last page, last column, one description appears at the top with empty space for the rest of the column. I would like to change the formatting of the text in the whole text-box so that most of the last column is used. I can select the text in the text box which expands over the few pages and play with the font size, but that would mean that all the text would be the same size. Is there a way that text...

Formatting Chart Category Labels
I'm creating a fairly complex chart - a spider graph "dashboard" report that addresses 4 major areas of an organization's performance - finance, quality, efficiency and customer satisfaction. Each category has 4-7 data elements, so that there are a total of 22 data elements on the chart. There will be 2 sections of the report, a chart showing YTD, LYTD and Goal values for the data elements and the graph itself. I envision this as a relatively easy way for management or board to get a snapshot of comparative key performance indicators. So far so good - input form, c...

conditional formating: ifs and highlighting rows
my spreadsheet documents error incidents, with each row showing the date the incident was discovered (column A) and the date it was resolved (column I). it also calculates networkdays (column J) -- unless column I=0 -- and references an array of holiday dates on another sheet. i would like to create a conditional format that will identify rows with an incident, but no resolution date, then highlight the row and possibly even show "unresolved" in column J cell of that row. Thanks! Well, you have to decide which way you want to go with this. If you leave column J ...

Which 'event' to run pivot chart formatting code on file open?
Greetings I have code to change my pivot chart type to a mix of line and column also to refomat colours I need to run the code so that the user sees the changes when the file is opened Ive tried the 'workbook open' event and the chart activate event but noy joy so far. (Once the file is open, manualy triggering the code works perfectly) Any ideas? Thanks I don't know why workbook_open doesn't work. You could use Application.OnTime to run your code a short time (like 2 sec) after the workbook opens. - Jon ------- Jon Peltier, Peltier Technical Services, Inc. http://Peltier...

Rotating page numbers
I have a document with both page layouts (landscape and portrait) however the page numbers obviously will be pointing in the direction of the associated layout does anyone know how to be consistent in this? ...