Currently Locked by another session on this machine!!!

  • Thread starter Thread starter corla
  • Start date Start date
C

corla

Guest
I keep getting this message when I try to update a recordset! There are no other users so I know the problem is within my code...can anyone help?

Couldnt Update: Currently Locked By another session on this machine.
 
Close the database then look to see if the record locking file (databasename.ldb) exists in the same directory as your database. If it does, delete it. Sometimes if you crash out of Access it leaves the ldb hanging and can lock you out. It is supposed to delete automatically when no users have the database open.
 
You may be getting this error if you have not set your recordset to nothing.
Dim rst as Recordset
set rst = currentdb.openrecordset("")
'When done with rst set to nothing
Set rst = Nothing

After you are do with the recordset in you code set it to nothing. You if you don't you will lock your self out of the rest of the code.
 

Users who are viewing this thread

Back
Top Bottom