John Bartow
john at winhaven.net
Fri May 2 10:04:07 CDT 2003
Compact DBIt depends. A2k and > has it on the Tools menu. For A97 use this: Public Sub SelfCompact() ' Comments : A massive work around to the lack of compact on close in A97. ' Builds a temporary Command Bar and then closes and reopens the DB. ' Code credit to Jim Dettman. Online Computer Services of WNY, Inc. jimdettman at earthlink.net ' Parameters : - ' Returns : - On Error GoTo PROC_ERR With CommandBars.Add(, 1, , True) .Controls.Add 1, 2071, , , True .Visible = True .Controls(1).SetFocus DoEvents SendKeys "~" End With Exit Sub PROC_ERR: MsgBox "The following error occurred: " & Error$ Resume Next End Sub HTH JB -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Smethurst, Ryan Sent: Friday, May 02, 2003 5:16 AM To: 'accessd at databaseadvisors.com' Subject: [AccessD] Compact DB ---- London Borough of Bromley E-Mail Disclaimer ---- "For information about Bromley Council visit our web site www.bromley.gov.uk" "The information contained in this message (including any attachments) is confidential in that it is intended solely for the use of the recipient to which it is addressed. If you are not the intended recipient, the use of the information by disclosure, copying or distribution is prohibited and may be unlawful." ---- End of Disclaimer ---- Hi Group, Is it possible to compact a db in code when quitting it? Thanks RyanS -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030502/7d874378/attachment-0001.html>