ACC95: QBE Grid and Property Sheet Save Date Values as String

ID: Q220973


The information in this article applies to:
  • Microsoft Access 7.0


SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

When you specify a two-digit date as a criteria in the QBE grid or an object's property sheet, the way the date is resolved as a four-digit date may differ, depending on the system settings of the computer on which you run the query.


CAUSE

Microsoft Access 7.0 stores criteria values from the QBE grid and property sheet settings as strings. These values are evaluated at run time. In the case of dates, your system settings will determine how a two-digit year will be resolved to a four-digit year.


RESOLUTION

You can ensure that date criteria and property sheet settings are interpreted the same way on all computers by entering them with four-digit years instead of two-digit years. For example, type #1/1/1999# in the QBE Criteria row to ensure that the query will look for records on January 1, 1999, regardless of the system settings of the computer running the query.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
This problem no longer occurs in the Office 95 Year 2000 Update.

For more information about the Office 95 Year 2000 Update, please visit the following Microsoft Web site:

http://officeupdate.microsoft.com/Articles/o95y2kfactsheet.htm
To download the the Office 95 Year 2000 Update, please visit the following Microsoft Web site:
http://officeupdate.microsoft.com/downloadDetails/O95y2k.htm


MORE INFORMATION

Microsoft Access resolves two-digit years into four-digit years differently, depending on the operating system that you are using. If you are using Windows 95 or Windows NT 4.0, dates are converted based on the version of OLEAUT32.DLL that is installed on the computer. For more information about OLEAUT32.DLL and date interpretation, please see the following white paper:

http://www.microsoft.com/technet/year2k/white/auto.htm
When you run Access on a Windows 98 computer, the way dates are resolved into four-digit years is dependent on the date window that you set on the Date tab of the Regional Settings dialog box.

For more information about user-defined date windows, search Windows 98 Help for "Dates, Year 2000."


The following is a list of properties that you might enter a date into:

Table Properties

  • ValidationRule

Table Field Properties

  • DefaultValue
  • ValidationRule

Form Control Properties

  • ControlSource
  • DefaultValue
  • ValidationRule

Report Control Properties

  • ControlSource
While other properties, such as RecordSource, RowSource, and Filter, may contain date values, these are programatic changes and are interpreted at run time.


REFERENCES

For more information about how Microsoft products are affected by year 2000 (Y2K) issues, please see the following Microsoft World Wide Web site:

http://www.microsoft.com/y2k/

Additional query words: pra Y2K KB2000

Keywords : kbdta kb2000
Version : WINDOWS:7.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: May 13, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.