Trying to run this code in Excel VBA to open an access DB and run it. I'm getting the error "You already have the Database Open"
Now, logic is that I already have it open - but I don't? And, there is no lock on this Access DB in the folder. Any idea to get past this please?
Sub OpenAccess()
With New Access.Application
.OpenCurrentDatabase "G:\clickhere\test.accdb"
.Visible = True
.DoCmd.RunMacro "STEP1_qdelExistingData"
'If you want to close it when done...
.CloseCurrentDatabase
End With
End Sub
Now, logic is that I already have it open - but I don't? And, there is no lock on this Access DB in the folder. Any idea to get past this please?
Sub OpenAccess()
With New Access.Application
.OpenCurrentDatabase "G:\clickhere\test.accdb"
.Visible = True
.DoCmd.RunMacro "STEP1_qdelExistingData"
'If you want to close it when done...
.CloseCurrentDatabase
End With
End Sub