Determine if .ldb file exist

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top