An ldb file is an Access locking file (located in the same folder as your
mdb, mde or mdw)... You will only see it if someone (or yourself) has the
database open (even if via linked tables etc.). If your Access mdb is
secured using Workgroup security you will also have to reference the
appropriate mdw (i.e. workgroup file) to open it.
I'm not sure if an ldb would be created against the original file if you use
createOnject. I have never had to do this myslef.
You could also try opening the ldb in notepad (you may have to wrap the
text) and you will see the machine and user name for anyone accessing the
mdb. You could possibly be in there twice. Note that the ldb sometimes still
shows users that have logged out already (though I don't think this would
cause you a problem).
Try:
a) Before running your code, check if there is an ldb accompanying your mdb
(i.e. in the same folder), if there is then someone has the mdb open (or the
ldb hasn't been cleared so just delete it, or you have a process running
thats still accessing it).
b) Run to the error, without clicking 'OK' navigate to wherever the mdb is
and check for an ldb, if there is one present now that wasn't before, have a
look inside and see who's logged in (you may be in there more than once.)
c) Click OK, see if it still exists after passing the error.
This is not a solution, but may help you pin down the problem...
Also (and I may be talking complete rubbish here), open up Acces, go to
options and see if it is set to open mdb's exclusively by default. I'm not
sure if this would affect "createObject" but if it did then it may be worth
deselecting the option and trying again.
Note: If all you are doing is manipulating data then you'd be better off
just migrating the macro into vb...
hth Mark
<Sh***********@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
>I have tried closing all instances of the Access program before I run
my program. My program opens Access to try to do this.. Could that be
part of the problem?
Not sure what an LDB file file is.
HKSHK wrote:
>Dear Shooter4Life8,
Additional information: Microsoft Office Access can't open the database
because it is missing, or opened exclusively by another user."
If you use Access with that database at the same time it might be, that
Access opened it exclusively. In this case, you would have to close
Access first before your program can open the database.
If this is not the case, check if there is an LDB file (when neither
Access nor your program is running. If that is the case, delete it and
try again.
Best Regards,
HKSHK