ACC: How Windows Regional Settings Affect Microsoft Access

Last reviewed: May 13, 1997
Article ID: Q142009
The information in this article applies to:
  • Microsoft Access versions 2.0, 7.0, 97

SUMMARY

Moderate: 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 Format

In 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,33

If 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.33

If 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 Format

The 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:

  • In Visual Basic for Applications, you must use U.S./English Date formats when creating SQL statements.

    For more information about formatting dates regardless of regional settings, please see the following article in the Microsoft Knowledge Base:

          ARTICLE-ID: Q149095
    
          TITLE     : ACC: How to Format Dates Regardless of Regional Settings
    
    
  • In the query grid, you can use International Date formats.
  • Regional settings don't control the Medium Date format (MM-DDD-YY). The Medium Date format is determined by the language edition of Microsoft Access. For example, if you have a database on computer #1, running French Microsoft Access, and then copy the database to computer #2, running English (US) Microsoft Access, the Medium Date format will be different on computer #2.
  • If you set the Regional Settings tab in Regional Settings to Finnish and set your Time separator to a period (.), various Date and Time functions may not work.

For more information about issues using a period (.) as a time separator, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q142055
   TITLE     : ACC: INTL Finnish Time Separator Period (.) Breaks
               DateValue()

Number Format

Use 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

REFERENCES

For 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
localisation
Keywords : EvnOthr kbenv
Version : 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 13, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.