ACC: INTL Finnish Regional Setting Breaks DateValue()

ID: Q142055


The information in this article applies to:


SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you use the DateValue() function in a calculated field in a query, it returns the following error value:

#Error

Or when you use the DateValue() function in Visual Basic for Applications, you receive the following error message:

In Microsoft Access version 7.0:
Type Mismatch

In Microsoft Access version 2.0:
Illegal function call


CAUSE

The cause depends on your operating system and regional settings:

NOTE: If the Time separator is set to a period and the Control Panel's Country or Regional Settings is set to Finnish or Finland, all Microsoft Access Date functions will fail to run whenever the Time portion of a Date/Time field has a value. However, for this problem to occur in most cases, you must manually set the Time Separator to a period (.). The Time separator is automatically set to a period (.) only when you choose Finland as the Country setting in Windows 3.1 or Windows for Workgroups.


RESOLUTION

Change the Time separator in the Windows Control Panel to a colon (:).


MORE INFORMATION

  1. In windows 95 or Windows NT version 4.0, in the Control Panel's Regional Settings dialog box, set the Regional Setting to Finnish and set the Time separator to a period (.).

    In Windows version 3.1 or Windows NT version 3.51, set the Control Panel's Language setting to Finnish, which automatically sets the Time separator to a period (.).


  2. Open the sample database Northwind.mdb (or Nwind.mdb in version 2.0.).


  3. Open a new module.


  4. On the View menu, click Debug Window (or Immediate Window in version 2.0).


  5. Type the following line in the Debug window, and then press Enter:

    ?DateValue(now)

    Note that you receive one of the errors listed in the


Additional query words: international int'l


Keywords          : kbenv kberrmsg 
Version           : 2.0 7.0
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: April 27, 1999