How can I reset a database if Run|Reset doesn't work?

A

Allen_N

I am trying to delete a table prior to rebuilding it in code. Thsi works fine
the 1st time I run the app after loading the database:

DoCmd.DeleteObject acTable, "Commonality"

On subsequent runs, however, I get Run-time error '3211': "The database
engine could not lock table 'Commonality' because it is already in use by
another person or process." I then have to reset the app and then manually
delete the table in Access. I obviously can't release the app with this
happening, so how can I avoid this error?

Thanks!
 
A

Allen_N

Sorry, I just figured it out. I was trying to delete the table while there
was a form open whose RecordSource was a query that depended on the table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top