Can't kill 'e can't live with 'em.
If Dir(strDB) < "" Then
Kill strDB
End If
Set AppAccess = CreateObject("Access.Application")
AppAccess.Visible = True
AppAccess.OpenCurrentDatabase strDB
AppAccess.DoCmd.Opentable "MSP Data", acViewNormal, acAdd
---------------------------------------------
Throws an Error cannot open the database because it is missing or opend
exclusively by another user
-------------------------------------------
If Dir("C:\DataCheck.mdb") < "" Then
MsgBox "Datacheck Exists"
Kill "C:\DataCheck.mdb"
End If
Set appAccess = CreateObject("Access.Application")
appAccess.Visible = True
With appAccess
..NewCurrentDatabase ("C:\DataCheck.mdb")
..Visible = True
---------------------------------------------
Throws an error saying there is an existing database with this name, choose
another name.
|