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

Compacting database, through VBA, while running module? 1

Status
Not open for further replies.

xtreme1

Programmer
May 27, 2000
51
US
Is it possible to compact a database while it is open? I've tried the CompactDatabase method, as well as DoCmd.RunCommand acCmdCompactDatabase. I feel like there must be some way for me to automate this from a single module, instead of having one that runs a program and a seperate one that handles the compacting. That just seems inefficient to me. Anyway, I appreciate any thoughts or ideas...thanks in advance.

xtreme1
rbio@excite.com

 
assuming you are using Full Menus, you can use SendKeys. Create a Macro with SendKeys as the action and use

%(tdc)

for the KeyStrokes and

No

for Wait


This opens the Tools Menu, selects Database Utilities and then Compact Database.
PaulF
 
Gracias Paul, was very helpful. =]

xtreme1
rbio@excite.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top