By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,327 Members | 1,789 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,327 IT Pros & Developers. It's quick & easy.

Compacting a database

P: n/a
I use the following code that I found on the Access Web to allow a user
to compct the database from a command button and it works great.I am
able to pass the user a message before the routine runs that tells them
what to expect. Is there a way to determine if the compact was
successful, and if it was, then pass the user a message to that effect?

Thank you

Colin Ward
Public Sub CompactDB()

CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction
End Sub
' ***** Code End ****

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ColinWard wrote:
I use the following code that I found on the Access Web to allow a user
to compct the database from a command button and it works great.I am
able to pass the user a message before the routine runs that tells them
what to expect. Is there a way to determine if the compact was
successful, and if it was, then pass the user a message to that effect?

Thank you

Colin Ward
Public Sub CompactDB()

CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction
End Sub
' ***** Code End ****


If it weren't sucessful, the user will have been notified by Access anyway.
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.