This article was previously published under Q178650
This article has been archived. It is offered "as is" and will no longer be updated.
Novice: Requires knowledge of the user interface on single-user computers.
When you try to run a large, complex, select query or a large action querysuch as a make-table query on a dual processor computer, the query does notfinish processing, and Microsoft Access stops responding (hangs). If youmonitor the system, you see that the processor time drops to between 0% and1% shortly after the query begins running. However, you can pressCTRL+BREAK to terminate the query, and Microsoft Access functions normally.This behavior also occurs if you try to import a delimited text file thatis 70 megabytes (MB) or larger.
You can run the same query or import the same text file on a singleprocessor computer.
There are two resolutions and one workaround to this problem.
Install Microsoft Office 97 Service Release 2
Obtain and install the Microsoft Office 97 Service Release 2. For more information about getting this Service Release, see the followingarticle in the Microsoft Knowledge Base:
151261 OFF97: How to Obtain and Install MS Office 97 SR-2
Install Microsoft Jet 3.51
Obtain Jet35sp3.exe from the Microsoft Web site; this file contains the updated version 3.51 of the Microsoft Jet database engine. For information about how to obtain Microsoft Jet 3.51, see the following article in the Microsoft Knowledge Base:
172733 ACC97: Updated Version of Microsoft Jet 3.5 Available for Download
To work around this problem, use only one processor if you intend to run large, complex queries or import large text files on a dual processor computer. Follow either of these methods to use only one processor.
Press CTRL+ALT+DEL, and then click Task Manager.
Click the Processes tab.
Right-click MsAccess.exe, and then click Set Affinity.
Click to clear either CPU0 or CPU1.
Click OK, and then close Task Manager.
Create a new database.
Create a new form.
Add a command button named Command0.
Click Code on the View menu.
Type the following code:
Option Compare DatabaseOption ExplicitPrivate Declare Function SetProcessAffinityMask Lib "kernel32" _ (ByVal hProcess As Long, ByVal dwProcessAffinityMask As Long) As LongPrivate Declare Function GetProcessAffinityMask Lib "kernel32" _ (ByVal hProcess As Long, lpProcessAffinityMask As Long, _ lpSystemAffinityMask As Long) As LongPrivate Declare Function GetCurrentProcess Lib "kernel32" () As LongPrivate Declare Function OpenProcess Lib "kernel32" _ (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, _ ByVal dwProcessId As Long) As LongPrivate Declare Function CloseHandle Lib "kernel32" _ (ByVal hObject As Long) As LongPrivate Declare Function GetWindowThreadProcessId Lib "user32" _ (ByVal hwnd As Long, lpdwProcessId As Long) As LongPrivate Const PROCESS_SET_INFORMATION = (&H200&)Private Const PROCESS_QUERY_INFORMATION = (&H400&)Dim a As ObjectPrivate Sub Command0_Click() Dim idThread As Long Dim idProcess As Long Dim ProcessAffinity As Long Dim SystemAffinity As Long Dim lRet As Long Dim hProcess As Long idProcess = Shell("C:\Program Files\Microsoft" & _ " Office\Office\MSACCESS.EXE" & _ " C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb", _ vbMaximizedFocus) If idProcess Then hProcess = OpenProcess(PROCESS_QUERY_INFORMATION Or _ PROCESS_SET_INFORMATION, False, idProcess) lRet = GetProcessAffinityMask(hProcess, ProcessAffinity, _ SystemAffinity) ProcessAffinity = 1 ' this sets the process to only run on CPU 0 ' for CPU 1 only use 2 and for CPUs 1 & 2 use 3 lRet = SetProcessAffinityMask(hProcess, ProcessAffinity) CloseHandle (hProcess) End IfEnd Sub
Save the form, and then open the form in Form view.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was corrected in Microsoft Jet 3.51.
For additional information about how to obtain Microsoft Jet Database Engine 3.51, click the article number below to view the article in the Microsoft Knowledge Base:
172733 Updated Version of Microsoft Jet 3.5 Available for Download
Steps to Reproduce Problem
Start Microsoft Access on a dual processor computer and open the sample database Northwind.mdb.
Create a new query in Design view.
In the Show Table dialog box, click the Tables tab and select the Orders table.
Click Add twice so that the Orders table is added to the query twice, and then click Close. Do not create a join between the tables.
Drag the asterisk (*) from the Orders table into the query grid, and then drag OrderID from Orders_1 (the second instance of the Orders table) into the query grid.
On the Query menu, click Run. The query should return over 688,000 records.
On the View menu, click Design View.
On the Query menu, click Make-Table Query.
In the Make Table dialog box, type qryTestTable and click OK.
On the Query menu, click Run. Note that Microsoft Access stops responding before the query finishes processing.