On Timer Question

ipr1

Registered User.
Local time
Today, 14:39
Joined
Jun 13, 2003
Messages
31
I want to compact a series of databases. Currently, I use a combo box and set it to run a macro to open and compress each database (run app command with a path as follows:

"c:\programs\msoffice\msaccess.exe" "c:\documents\dbname.mdb"/compact

Currently, I have to individually select each databse in the combo box, then click the command box, etc. and, if this is the best I can do, so be it.

However, I am playing around with the concept of tryiing to create something that will run a macro to compact the first database, then, once the first one is finished compacting to compact the second one etc. etc.

Am I nutso or is there a possibility that I can do something like this. Thanks in advance for any answers I receive.
 
Hi Rich - Yes, it is an option and I may be left with it but I really was interested in automating the entire process.

Thanks for your speedy help. I appreciate it.
 
You can do a loop.

The compact creates a temporary DB in your compacting directory (DB1 i think), check on the excistance of that file or even the ldb if that excists during compact.

do while dir("C:\Temp\db1.mdb") <> ""
loop

then compact the next file

Regards

The Mailman
 
After you compress one database, in that macro, have it run another macro to compress the second database, then in that macro run a macro to compress the third, and so on.
 
Bob,

Why not put together a .BAT file or a VBScript and let the
Windows Scheduler run it?

Wayne
 
Thanks for your suggestion Wayne.

Any chance you could provide an example of the Bat file? (If I am right, I would have to have a Bat file for each database I wanted to compact; if I put all databases in one Bat file, we would still have the timer issue to resolve.
 

Users who are viewing this thread

Back
Top Bottom