The information in this article applies to:
- Microsoft Access versions 2.0, 7.0, 97
SYMPTOMS
Moderate: Requires basic macro, coding, and interoperability skills.
When you use the Find dialog box to search for a value in a query, you may
receive the following error message.
In Microsoft Access 97
MSACCESS caused a stack fault in module MSJET35.DLL
In Microsoft Access 7.0
MSACCESS caused a stack fault in module MSJT3032.DLL
In Microsoft Access 2.0
MSACCESS caused a General Protection Fault in module MSACCESS.EXE
Note that this error only occurs when you display unique values in your
query result, and the field you are searching with Find is sorted in
Ascending order.
RESOLUTION
To work around the problem, create a form based on the query and use other
methods to search for specific records on your form.
The following example uses the sample database Northwind.mdb (or NWIND.MDB
in version 2.0) to demonstrate a method to find a record using a combo box
on a form:
- Open the sample database Northwind.mdb (or NWIND.MDB in version 2.0).
- Create the following new query called EmployeeZip based on the
Employees table:
Query: EmployeeZip
-------------------------------------------------
Type: Select Query
Field: Region
Table: Employees
Field: PostalCode (or Postal Code in version 2.0)
Table: Employees
Sort: Ascending
- On the View menu, click Properties. If the Field List Properties
dialog box appears, click in an empty space in the upper half of the
query design window to view the Query Properties dialog box.
- Set the Unique Values property of the query to Yes.
- Save the query and close it.
- Create the following new macro called FindZip:
Macro Name Action
-----------------------------
FindZip GoToControl
FindRecord
Locate Product Actions
-------------------------------
GoToControl
Control Name: PostalCode
FindRecord
Find What: =[FindPostalCode]
Find First: Yes
- Create the following new form in Design view called FindEmployeeZip:
Form: FindEmployeeZip
-----------------------------------
RecordSource: EmployeeZip
Caption: Find Employee Postal Codes
DefaultView: Single Form
Text Box
Name: Region
ControlSource: Region
Text Box
Name: PostalCode
ControlSource: PostalCode (or Postal Code in version 2.0)
Combo Box
Name: FindPostalCode
RowSource: EmployeeZip
ColumnCount: 2
ColumnWidths: 0";1"
BoundColumn: 2
AfterUpdate: FindZip
- View the FindEmployeeZip form in Form view. Note that when you select a
zip code in the combo box, the record with that zip code becomes the
current record on the form.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 2.0, 7.0
and 97. We are researching this problem and will post new information
here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Problem
WARNING: Following these steps will cause a general protection fault on
your computer. Make sure you save and close any open work on your computer
before following these steps.
- Perform steps 1-4 in the "Resolution" section of this article.
- View the query in Datasheet view.
- Click in the Postal Code column.
- On the Edit menu, click Find.
- In the Find In Field dialog box, type 98033 in the Find What box, and
then click Find First.
- Type 98052 in the Find What box, and then click Find Next.
- Type 98033 in the Find What box, and then click Find Next.
- Click Find Next again. Note that the error occurs.