The information in this article applies to:
SYMPTOMS
Moderate: Requires basic macro, coding, and interoperability skills.
RESOLUTION
Always pass a valid interval value to the DateAdd(), DatePart(), and
DateDiff() functions. To be sure you pass a valid interval value, you can
test for the value of the variable before you invoke the function, as in
the following example:
Another way to prevent the page fault error is to initialize the variable as a zero-length string as soon as you declare it. For example:
Then, if you do not set the value of the variable to a valid interval before you pass it to the DateAdd(), DatePart(), or DateDiff() function, you receive the following error, but Microsoft Access does not terminate:
STATUSMicrosoft has confirmed this to be a problem in Microsoft Access 7.0. This behavior does not occur in Microsoft Access 2.0 or 97. MORE INFORMATIONSteps to Reproduce ProblemWARNING: Following these steps will cause a page fault on your computer. Make sure you save and close any open work on your computer before following these steps.
REFERENCESFor more information about DateAdd(), DatePart(), or DateDiff() functions, ask the Microsoft Access 7.0 Answer Wizard for "date functions."
Keywords : kberrmsg kbprg MdlGnrl |
Last Reviewed: April 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |