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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compact and repair.

Status
Not open for further replies.

priac

Technical User
Feb 8, 2002
47
US
I have a line of code that runs "on close" of the switch board. It looks at how many times the datbase has been opened and will start a macro etc. to compact and repair the database when it closes the 10th time. The problem is , I don't know how to write the process. How do I write code, micro, etc. to compact and repair. I know there is an option to do this every time it closes, but that is to often.
 
How about if you incorporate this with your code that checks to see how many time the db has been closed:

DoCmd.RunCommand acCmdCompactDatabase
Ann
 
I have tried this, but Access want let you compact from VB while the database is open, but you can click on tools" compact and repair" and it works.
 
Oops! Guess I'd better leave this one to the programmers. Hope you don't mind if I tag along 'cause I'd like to know how to do this myself for future reference. Ann
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top