Access2007 PW protected Run-time error'-2147467259(80004005)'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Juliom
    New Member
    • Oct 2010
    • 1

    Access2007 PW protected Run-time error'-2147467259(80004005)'

    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.

    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
    I have numerous cnn.Open & rst.Open thru out my DB VBA. any help would be appreciated. thank you.
    Last edited by Niheel; Oct 2 '10, 06:47 PM.
Working...