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!

Compacting DB Button...on Main Menu

Status
Not open for further replies.

smedvid

MIS
May 28, 1999
1,228
US
Here is how I previously provided a compact current DB butotn on a main menu form for Access-2000... Under Access-2002, it does the compact but does not appear to re-open the DB after the compact... any clues or suggested alternate approaches? tia,

Private Sub cmd_CompactDB_Click()
On Error GoTo Err_cmd_CompactDB_Click

'Display Menu Here..
MenuUtilities.UnHideAllMenuItems
Utilities.DelayTime 2
CompactDB

Exit_cmd_CompactDB_Click:
Exit Sub
Err_cmd_CompactDB_Click:
MsgBox Err.DESCRIPTION
Resume Exit_cmd_CompactDB_Click

End Sub

Public Function CompactDB()
CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction
End Function


Steve Medvid
"IT Consultant & Web Master"

Chester County, PA Residents
Please Show Your Support...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top