Hello all,
Using an event procedure that calls a macro when the user clicks the "Finished" button, I am attempting to 1) copy table to a different database and then 2) delete the table.
The copy works fine, but upon attempting the delete I get the error 3211 saying the table cannot be locked because it is in use by another person or process.
I'm baffled and feel like a real novice! What do I need to do to release this table??? This should be easy
Here is the code:
Private Sub Finished_Click()
DoCmd.Close acForm, "Open", acSaveYes
stDocName = "Exit"
DoCmd.RunMacro stDocName
DoCmd.Quit acSave
End Sub
And here are the actions in the macro Exit:
CopyObject (the table the form Open is bound to - works fine)
DeleteObject (the table the form Open is bound to - halts to error 3211)
(I'm surprised Access will copy a table that [it thinks] is in use but won't delete it.)
Thanks for any help.
Terri