Close and Reopen Access Application

JesseH

Registered User.
Local time
Today, 00:41
Joined
Apr 24, 2009
Messages
44
I have an Access/Excell Automation Application. Without going into a long early/late binding explanation, I would like to close the application that is running and reopen it immediately. This would allow Access to clean up after itself.

Does anybody know how to close and immediately reopen the same application.

Thanks for trying to help.
 
could you not simply do a compact and repair from inside excel?
 
Thanks. I will try that. Amazing how you always think of elaborate solutions and fail to consider the most obvious.

Thanks Again.:eek:
 
You wouldn't need to do this if you clean up your code. I assume that you are talking about instances of Excel that are held open while Access is open and they don't release until you close Access. The use of references to Excel objects without using an explicit object is what causes that problem. The fix is to fix it so you don't do things like:

Activecell.Range("X:X").Select

But instead do

xlWS.Activecell.Range("X:X").Select

or

Like

With Selection

becomes

With objXL.Selection

where you have declared objXL (and in the previous example xlWS).
 
Thanks. I will try your solution. Closing the app may cause user problems when more than one use is using the app.

Thanks Again.
 
Thanks. I will try your solution. Closing the app may cause user problems when more than one use is using the app.

If you have more than one user using a particular mdb/accdb file, you need to split the database to Frontend/Backend (backend gets the tables and frontend gets all other objects) and then EACH user should have a copy of the frontend on their machine. You should not run a single file with multiple users. If you do, you are flirting with corruption. It isn't a matter of IF you will have corruption, but when.
 

Users who are viewing this thread

Back
Top Bottom