Access 2003 won't close

G

Guest

I have a database recently ported from Access 2.0, now running in Access 2003
under Windows XP.
It is driven from a form with a number of buttons on it.
One of these is "Quit Access", with the code Application.Quit acQuitSaveNone.
Another is "Close database", with the code Application.CloseCurrentDatabase.

Both succeed in closing the database, but often Access stays open. Access
is then impossible to close without killing the task via the Task Manager.

Can anyone suggest what's going on here?
 
A

Allen Browne

Access will not close if some object is not releasing memory.

There could be many places to look for a problem of this kind. You need to
explicitly close everything you open, set your objects to Nothing, and
de-instantiate any classes you create. For example, if you OpenRecordset in
code, you need to close it again with:
rs.Close
Set rs = Nothing
and you need to ensure that this code executes even an error handler changes
the flow of the procedure.

It would also be worth repairing the database, such as the steps for the
first symptom in this article:
http://allenbrowne.com/ser-47.html
 
D

david epsom dot com dot au

You need to look for code like
If chkBox then

and change it to
If chkBox = true then

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top