Access won't close

vmon

Registered User.
Local time
Today, 19:44
Joined
Jan 21, 2003
Messages
49
I have a form that runs some code and when it runs I can close the form and database window but Access will not close. I have to use task manager to kill it. This is a big problem for my app. Code is involved and long but runs and finishes without error but something is hanging Access.

I am running A2k on XP.

Help,
vmon
 
Last edited:
Have you tried "Application.Quit" at the end of your code?
 
Are you using SendKeys in your code? I had problems with an Access 97 db shutting the Access program down when I used Sendkeys. I had to CrtlAltDelete the db just to close the Access program. That was reason number two for me not to use SendKeys.
 
that happens to me in 97 now and then. I just use the standard form 'X' to close mine and gt that problem some times. It closes the database but not access. When I close it it just minimizes Access
 
Pat Hartman said:
If your code is opening objects such as recordsets, you need to close the objects before trying to close the app. Then Access will close properly.

I have not been programming much. What are the standard closing activities for screens, modules, and applications? What event are they put on?

thanks,
vmon
 
llkhoutx said:
Have you tried "Application.Quit" at the end of your code?

I am not sure I follow you. I put docmd.quit on the switchboard close event but get the same result. The code I run updates a few fields on the form. The application is not exited after the button push.

vmon
 
Code is involved and long but runs and finishes
what code, are you opening say a recordset and not closing it
ie
rs Close
db Close ?
 
Rich said:
Code is involved and long but runs and finishes
what code, are you opening say a recordset and not closing it
ie
rs Close
db Close ?

Yes I am using recordsets. I "set rs = nothing" at the end of the section of code.

I am so new at recordsets I don't know what I should be doing.

vmon
 
I think I have found the answer.

Adding set rs = nothing, rs.close, and CurrentDb.Close after I use a record set seems to have done the trick.

Does anyone have recommended standards for how to open and how to close recordsets properly?

Thanks,
vmon
 

Users who are viewing this thread

Back
Top Bottom