B
BobV
Group:
I have added the code below to to my application. The code forces my
database to be compacted. The code runs fine when I run it under the full
version of Access 2002. However, when I run the code under the Access 2002
Runtime, I get an error message that says:
"You can't exit your program now. If your're running a Visual Basic module
that is using OLE or DDE, you need to interrupt the module."
I do not get the error when I execute the code with my application running
under the full version of Access 2002. Any ideas on how to fix the code so
that it will run without producing an error under the Access 2002 Runtime?
'COMPACT DATABASE NOW
Public Sub CompactDB()
On Error Resume Next
CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction
End Sub
Thanks,
BobV
I have added the code below to to my application. The code forces my
database to be compacted. The code runs fine when I run it under the full
version of Access 2002. However, when I run the code under the Access 2002
Runtime, I get an error message that says:
"You can't exit your program now. If your're running a Visual Basic module
that is using OLE or DDE, you need to interrupt the module."
I do not get the error when I execute the code with my application running
under the full version of Access 2002. Any ideas on how to fix the code so
that it will run without producing an error under the Access 2002 Runtime?
'COMPACT DATABASE NOW
Public Sub CompactDB()
On Error Resume Next
CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction
End Sub
Thanks,
BobV