Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSACCESS.exe process not terminating

Status
Not open for further replies.

XP2000

Programmer
Dec 14, 2001
40
0
0
GB
Got a problem with Access 2002 on a Win2000 Pro machine.

On closing an mdb database, the "MSACCESS.EXE" process fails to terminate. This means that users cannot restart Access until they go into Task Manager and use the "End Process" command on the "MSACCESS.EXE" process.

I'm sure there's a bug in my form coding somewhere. I suspect it could be associated with the switchboard.
This problem occurs both when you click X to close the database or exit the application via the switchboard.

Any suggestions on what to look for?

 
I am experiencing a similar problem with Access 2002 on a Win2000 Pro machine. MSACCESS.EXE will not terminate when I use the Access application's close button with a particular form open. If any other form is open, or if I exit via the switchboard, Access terminates just fine. I also suspect some coding problems as I am fairly new to Access project programming. The suspected form has a fair amount of VBA behind it and is used as the main record editing form connected to an SQL database. In Task Manager, CPU usage goes to nearly 100% and eventually causes the cooling fan to operate. However, I can start one or more other instances of Access. It has been awhile since you posted your question and I joined this site to get the answer. If you have an update, I would appreciate hearing from you.
 
Interesting you are using the same configuration and suffer the same problem.

I still have no solution for this one. I've checked all my 'set' statements terminate correctly and all my loops are coded correctly. All my forms are coded to close properly and still I have this problem.

I suspect mine is related to the switchboard, but sorry I haven't got the answer for this one.....yet.
 
I used the code below to eliminate the problem for now. Other forms do not seem to be causing a problem. Since the form in question has so much of my VBA behind it, I still suspect something I wrote to be the cause. With this code I can add other forms if required. Thanks for responding.

Code:
Private Sub Form_Close()
Dim obj As AccessObject
For Each obj In CurrentProject.AllForms
    If obj.Name = "frmRecordMaintenance" And obj.IsLoaded = True Then
        DoCmd.Close acForm, "frmRecordMaintenance", acSaveNo
    End If
Next
End Sub
 
Nice one.
Thanks for sharing that, I'll give it a try.
 
FYI

The last piece of code did not work. Apparently the problem I am having is intermittent. I tried this code in the switch board form_close event. MSAccess.exe does seem to terminate each time now. I still believe something in my code is preventing the closing of the SQL database connection but I am unable to find it.

<code>
If Application.CurrentProject.IsConnected = True Then
Application.CurrentProject.CloseConnection
End If
</code>
 
No, the code didn't work for me either. My problem is intermittent as well, which makes it much harder to diagnose.
Your code has been helpful in this diagnosis.
Please post if you get a result...I will do likewise.
 
At last I've found the problem. After many hours of testing I narrowed the fault down to on commonly used report. I re-created this report from scratch in the exact same way and the problem went away.
Unfortunately I have no explanation as to why this occurred.
 
In my application, it occured only when the data-entry form was left open when the user closed Access. This happens to be the only form with any substantial VB code behind it. I naturally looked for all the obvious things especially poor programming methods but couldn't find it. I decided to disable the Access Close (X) button and the Exit Command on the File Menu. This forced the user to exit via the main switchboard which closes all forms first. There are two knowledge base articles I used for the fix: Q245746 for ACC2000 and Q300688 for ACC2002.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top