locked table error

  • Thread starter matt donker via AccessMonster.com
  • Start date
M

matt donker via AccessMonster.com

I am at my wits end with this database no matter what i do i can literally
close the table before opening it and i still get a an error 3211 The
database engine could not lock table tblToolingArchive because it is
already in use by another peroson or process. I am the only currently using
the database so a person is out of the question as for process this code is
on the startup form nothing else uses the tbl i just don't understand.
Some one please help, i have searched this error on this site and nobody
seems to have a good fix. What do i do?

'Runs SQL to copy tooling taken data

DoCmd.Close acQuery, "qryToolingArchive"
DoCmd.OpenQuery "qryToolingArchive", acViewNormal,
acReadOnly
DoCmd.Close acQuery, "qryToolingArchive"
CurrentDb.TableDefs.Refresh
'Output the table to an excel file
DoCmd.OutputTo acOutputTable, "tblToolingArchive",
acFormatXLS, "\\tor-file-01\BusinessImprovement\AssemblySummer\mto08428\
Computer Inventory Database- Active\ToolingArchives\" & MonthName & YearNum



'Delete Table
DoCmd.DeleteObject acTable, "tblToolingArchive"

I have already written it directly in the vb code using run SQL that comes
up with the same error. Any other ideas anyone?
 
M

matt donker via AccessMonster.com

No i wish that was the case but no. All i can think of is that somehow the
query doesn't shutdown or something after its done. i don't know i am
honestly at a loss.
 

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