Determine if .ldb file exist

G

Guest

I tried the following code (which I got from a previous post). It works,
however I was curious where it should be called from. I have tried the
OnOpen; OnLoad; Autoexec Macro. I wanted to display a message to the current
user if file was locked or not.

Public Function FileExists(argFullName As String) As Boolean
'RETURNS TRUE IF THE FILE EXISTS
FileExists = Len(Dir(argFullName)) > 0
End Function

Thanks for your help
 
D

Douglas J. Steele

I'm not sure what you're looking for.

As soon as you make a connection to the database, the locking file exists,
even if there's only a single user connected. The fact that the ldb file
exists doesn't mean that the mdb's locked.
 

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