Access 2007 VBA with Encoded DB RRS feed

  • Question

  • I have SW that works with not encoded DB. I know how to encoded the DB itself, but I don't know how to working with it with VBA code.
    My code:

    Function myApplicationStart()
    Call GetDataInfo
    If ReattachAll(DataDir, "Attached Tables") Then
    If Not (GetParamFromIniFile) Then
    MsgBox "Problem in Get Parameters From IniFile", vbCritical, gTITLE
    Exit Function
    End If
    End If
    End Function
    Sub GetDataInfo()
    Dim i As Integer
    i = GetIniString("Access", "SharedData ", DataFile)
    DataDir = File_Path(DataFile)
    DataName = File_Name(DataFile)
    End Sub
    Function ReattachAll(ByVal NewDir As String, ByVal TableName As String)
    Dim MyDatabase As Database, MySet As Recordset
    Dim nTab As Integer
    Dim Conn As String, FileName As String

    ' get current database
    Set MyDatabase = CurrentDb()
    Set MySet = MyDatabase.OpenRecordset(TableName, dbOpenTable)
    MySet.Index = "PrimaryKey"
    nTab = MySet.RecordCount

    End Function

    It is possible?
    Wednesday, October 26, 2011 8:46 AM

All replies

  • What is the exact question you have?

    How to create a connection to an encrypted Access 2007 database?

    Or how to re-link the tables to an encrypted Access 20007 database?


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Wednesday, October 26, 2011 3:58 PM