Hey Guys,
I have an access database with a few tables and forms. I was trying to add a new combo box to one of my forms and to do so i needed to add the referenced data to my reference data table. simple or so I thought, but while attempting to do so I got the following error ""database engine could not lock table because it is already in use by other " . I am currently the only user with access to this database so i'm at a lost as to how it is possible that the database is locked by another user.
Please can anyone assist.
First of all, check to make sure that there is no .ldb file residing in the same folder as your database that remains there after you have closed the db, if there is, delete the .ldb file. (this is an access generated file that logs which users are accessing which parts of the database, to lock out/avoid conflicts with one user accessing the same record as another at the same time.)
I had a similar problem happen to me rather intermittently. I tracked it through a combination of deductive reasoning and intuition :-) to closing the db after having failed to compile any code changes in the VBA editor window.
From that I learned quickly to Compile, Save, Check Compile status, Save again before leaving the VBA editor window.
Another suggestion is to make sure you Compact-Repair and backup your database on a regular basis, at least once a day when you finish for the evening.
If you are interested in how to prevent corrupted databases, this is a very good page dedicated to just that:
http://allenbrowne.com/ser-25.html
Just for reference purposes, here is Allen's Recovering corrupted databases page:
http://allenbrowne.com/ser-47.html
Hope this helps you with your problem.
Regards,
Scott