Run time error - (-2147467529 (80004005))

G

Guest

I can successfully run some codes in a standard module and create recordsets
for an query. However, if I want to run this module again, I will always get
the above run time error and a msgbox "The database has been placed in a
state by User"Admin" on machine "xxxx" that prevents if from opened or
locked". I can only then run the module by shutting down Access and then run
it again.

Using debug, it leads me to this line

DB.open strconnection

I close my database connection and set the recordset and connection to
nothing at the end of the module.

DB.close
set recordset1 = nothing
set recordset2 = nothing
set DB = nothing

What have I done wrong and how can I get rid of this run time error.
-Many thanks!
 
G

Guest

Somewhere, you've left something "open." I used to get this error a lot when
I was writing a very complex project all in VBA. What I found was that if I
had the VBA code window open, and clicked the STOP button, I could (usually)
do my save(s).
 

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