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

Compress and Repair Function 1

Status
Not open for further replies.

stotzc001

Technical User
Mar 27, 2003
30
0
0
US
Is it possible to put a button on a form that would force my access 2000 database to complete a compress and repair? I know I can set access to perform this option when the database closes, but I dont want it to run everytime, and I really dont want to have to explain to people at work how to go through the menu's when a database is acting up.
 
In the Click event of your button, call this function:
Code:
Function DoCompression()
'Compact the current (open) Database
    SendKeys ("%(TDC)")
    
End Function

HTH
Lightning
 
Had to make one adjustment, but it works. Thanks for your help and enjoy the star.



Function DoCompression()

SendKeys ("%{T}DC")

End Function
 
hi, have a look here for some alternatives to sendkeys thread705-642227
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top