Compacting error -#3356

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I had this compacting routine working for days in my access 2003 program,
then i ran it this morning and got a "you attempted to open a database that
is already opened exclusively by user admin in machine.... (runtime error
3356). I rebooted machine. Nothing else is using it, and as i said it was
running fine in the past. How in the world can i get it to work, i even
added code to close it, buut still...

yes there is a .ldb open on the db..but it worked b4!

here's what i have:
'i just added this..but it doesn't help
Set dbWCData2003 = OpenDatabase("c:\bcs\worldchildren\wcdata2003.mdb")
With dbWCData2003
.Close
End With

'''
DBEngine.CompactDatabase "c:\bcs\worldchildren\wcdata2003.mdb",
"c:\bcs\worldchildren\wcdata2003Compact.mdb"

thank you for your time and help!!!!...in advance....
 
Hi Bill

Try deleting the LDB. If you cannot, then something does indeed have the
database open. If you can delete it then try your code again.
 
Back
Top