ACC: How Windows Regional Settings Affect Microsoft AccessLast reviewed: May 13, 1997Article ID: Q142009 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. This article demonstrates how Microsoft Access handles Currency, Date/Time, and Number formats when you change the Regional Settings in the Windows 95 and Windows NT 4.0 Control Panel. NOTE: This article assumes you're using Microsoft Access with Windows 95 or Windows NT 4.0. The Regional and International settings in earlier versions of Microsoft Windows are not identical to those in Windows 95 and Windows NT 4.0.
MORE INFORMATION
Currency FormatIn Microsoft Access, the way Currency values are stored and the way they are formatted derives from the Currency tab of Regional Settings in the Windows Control Panel. Problems can occur if you change the Regional Settings after adding data to a currency field in a table. Changing the Regional Settings modifies only the data format; it does not change the actual data. For example, if you set the Regional Settings tab in Regional Settings to Dutch (standard), a currency field appears as follows:
Order Amount ------------ kr 5,47 kr 10,33If you later change the Regional Settings tab in Regional Settings to English (United States) the format of the field changes; however, existing data does not change. The existing data does not change because kr 5,47 does not buy the same amount as $5.47. For the English (United States) regional setting, the same value would be formatted like this:
Order Amount ------------ $5.47 $10.33If you do not want the format to change when the Regional Settings are changed, define a custom format for the currency field in Microsoft Access, such as kr #,##, using the field's Format property. The custom format in Microsoft Access overrides the currency format in the Control Panel's Regional Settings. If you want Currency values to convert automatically based on the Currency format, you must create a custom Visual Basic for Applications procedure to provide that functionality. This article does not provide that procedure.
Date/Time FormatThe Time tab in Regional Settings determines the long and short formats of Date/Time values and Time separators. For example, the English (United States) short Date format is M/D/YY and French (Canadian) is YY-MM-DD. The English (United States) Time separator is a colon (:) and the Spanish (Chile) Time separator is a comma (,). When you use Regional Settings other than English (United States), consider the following:
ARTICLE-ID: Q142055 TITLE : ACC: INTL Finnish Time Separator Period (.) Breaks DateValue() Number FormatUse only English number formats with Number functions in SQL. If you use non-English formats, some functions may fail. For example:
SELECT CDbl(0,09) AS Field1 FROM Employees;Notice the comma (,) instead of a period (.) as the Decimal separator. This SQL statement returns the following error:
Wrong number of arguments used with function in query expression 'CDbl(0,09)'.NOTE: When you change your Regional Settings, the Database Sort Order in Tools Options changes to match the Country you select. However, to update existing databases to the new sort Order, you must run the Compact Database command on them. For more information about the Sort Order, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q133381 TITLE : ACC: How the Windows Code Page Affects Sort Order REFERENCESFor more information about international display formats, search for "international settings," and then "Controlling international data display formats" using the Microsoft Access 97 Help Index.
|
Additional query words: globalization international int'l localization
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |