Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compact, run actions before, then compact

Status
Not open for further replies.

klasse

Programmer
Jan 12, 2004
32
0
0
SE
Hi,

I have a button on the menu (copied from the default menu) to compact the database.
I would like it to run some routines or functions before it actually tries to compact the database, how could I do it?

Thanks,

Klasse
 
Hi Klasse,
The easiest way I can tell would be to add another custom button to your menu that says "CLICK BEFORE COMPACTING" that runs your functions.

As far as automatically running functions before compacting the current database, I'm not sure it's possible. The only way I know of to compact a database in code is through the CompactDatabase method of the DBEngine object. This method only works on databases which are already closed.

Sorry I couldn't be of more help..
 
Hi Katerine,

I'll do what you propose. It is a solution in any case.

Thanks for your answer,

Klasse
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top