Open and Close db

G

Guest

Good morning,

I need to automate the db maintenance. Basically I would like to know:

1. Is it possible and how can I schedule a task to open the back end of a db
and then close it (it will automatically compact and repair).

2. Alternatively, could I create a VBA code that would open another db and
then close it, and schedule that script as an autorun in a db, and schedule
that db to run.

As always, I am also open to any better idea on how to approach this issue!

Thanking you for your input and help!!!

Daniel
 
G

Guest

1. You can use the windows schedular to run an mdb
2. You can't repair and compact the mdb that is currently open, so you need
to open another mdb that will compact and and repair the right mdb.
To do so, you can create a macro called Autoexec, that will run the code
that compact and repair the other mdb, with a second command that will quit
application.

3. If you not familliar with the autoexec macro, then after you create it,
when you open the mdb access will automatically run it, if you want to open
the mdb without running the macro, hold the shify key down.
 
G

Guest

Thank you both for your answers! Currently trying to implement them to see
which best meets my needs.

Thank you!
 

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

Top