Code to make sure there is no.ldb file

marathonlady

Registered User.
Local time
Yesterday, 21:56
Joined
Jul 10, 2002
Messages
120
I have the code to compact a database, but what is the code to see if the database is in use?

Thanks in advance.
 
Externally...
Code:
    If Dir("X:\YourDatabase.ldb") <> "" Then
        MsgBox "The #$%^&* database is still open!", vbCritical, "Compact Error"
        Exit Sub
    Else
        MsgBox "All clear, compact away."
    End If
 

Users who are viewing this thread

Back
Top Bottom