From: Topeters on
I ran my compact code with the application close event and got the error. Can someone help with this?
Here's my code

'Turn off Access warning
DoCmd.SetWarnings False

'Append logout data to Logged User table
DoCmd.OpenQuery "qry_UpdateLogOut", acViewNormal
'Turn Access warning back on
DoCmd.SetWarnings True

'Compact the database
CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction


'Exit application - The close event starts and closes all other open forms

DoCmd.Quit



Jeff Boyce wrote:

Re: Compact and Repair Error
03-Sep-09

Chuck

Before running C&R, make a backup copy, just in case.

Just in case, make two...

Regards

Jeff Boyce
Microsoft Office/Access MVP


"Chuck" <Chuck(a)discussions.microsoft.com> wrote in message
news:6A6F1563-2EE7-4357-9D6A-3A570C30F004(a)microsoft.com...

EggHeadCafe - Software Developer Portal of Choice
Run the command or application in the Security context of specified user
http://www.eggheadcafe.com/tutorials/aspnet/1282dcc7-c0a0-4601-87e2-cd97ef257c99/run-the-command-or-applic.aspx