Run-time error'-2147467259(8000 4005)'
Could not use
'C:\TestDB\Netf ront\Netfront.a ccdb';file already in use
I have to enter a password to open my DB. once the DB is open, and I click on a form button that has some VBA that issues a "cnn.Open" command I get the runtime error. see code sample. the variable SupportDBPath2 is define as follows.
I have numerous cnn.Open & rst.Open thru out my DB VBA. any help would be appreciated. thank you.
Could not use
'C:\TestDB\Netf ront\Netfront.a ccdb';file already in use
I have to enter a password to open my DB. once the DB is open, and I click on a form button that has some VBA that issues a "cnn.Open" command I get the runtime error. see code sample. the variable SupportDBPath2 is define as follows.
Code:
Public Const SupportDBPath2 = "C:\TestDB\NetFront\"
Function ValidateShipmentEvents7()
Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rst As New ADODB.Recordset
cnn.Open "Provider=Microsoft.ace.oledb.12.0;Data Source=" & SupportDBPath2 & "NetFront.accdb;Persist Security Info=False"
cmd.ActiveConnection = cnn
rst.Open "SELECT * FROM [Distinct Query Date Final]", cnn, adOpenDynamic, adLockOptimistic, 1