ACC97: Fatal Error When You Use Code to Open Non-Default Instance of Form (201962)
The information in this article applies to:
This article was previously published under Q201962 Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you use code behind a command button to open a non-default instance of a form, a fatal error may result if the form being opened contains a list box or combo box that is populated by using a function instead of a value list, field list, or table/query. The error message varies, according to the operating system of the computer.
Microsoft Windows 95, Microsoft Windows 98, or Microsoft Windows Millennium Edition (Me):
This program has performed an illegal operation and will be shut down.
If the problem persists, contact the program vendor.
When you click Details (on Microsoft Windows Millennium Edition, press ALT+D), you receive the following message: The instruction at 0x00000000 caused an invalid page fault in MSAccess.exe 97 at 0x00000000. The memory could not be 'read'.
NOTE: The actual memory address may vary.
Microsoft Windows NT:
An application error has occurred and an application error log is being
generated.
Exception: access violation (Exception:access violation (0xc0000005), address:Address 0x00000008)
Microsoft Windows 2000:
The instruction at "0x00000000' referenced memory at "0x00000000". The memory could not be "read".
The program shuts down whether you click OK or Cancel.
CAUSE
This problem occurs when you use a non-default (instantiated) instance of a form. When a function included in the form module is used to set the RowSourceType property of a list box or combo box on the instantiated instance of a form, a fatal error occurs in Msaccess.exe.
The problem does not occur on the default (or normal) instance of a form or when the function is moved to a standard module.
RESOLUTION
To work around this problem, use one of the following methods:
STATUSMicrosoft has confirmed that this is a problem in Microsoft Access 97.
Modification Type: | Major | Last Reviewed: | 9/27/2003 |
---|
Keywords: | kbbug kbpending KB201962 |
---|
|