How to Generate a User List

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kpus
    New Member
    • Sep 2016
    • 1

    #31
    This is FANTASTIC code. I too had the issue with needing to find out the users in a back end database. I attempted to use the code of:

    cnn.Open "Provider=Micro soft.ACE.OLEDB. 12.0;" & _
    "Data Source=" & GetLinkPath & ";"
    However, my backend database is password protected.

    My GetLinkPath code is:

    Public Function GetLinkPath()
    On Error GoTo Err_GetLinkPath

    Dim tdf As TableDef

    For Each tdf In CurrentDb.Table Defs
    If tdf.Name = "tblCo" Then
    GetLinkPath = Mid(tdf.Connect , 11)
    End If
    Next tdf
    Set tdf = Nothing
    Exit_GetLinkPat h:
    Exit Function

    Err_GetLinkPath :
    MsgBox "An '" & Err.Description & "' error occurred. ", vbOKOnly + vbCritical, "Error in GetLinkPath"
    Resume Exit_GetLinkPat h


    This gets the password along with the table name, but i'm still getting "An 'Object variable or With block variable not set' error occurred.

    Is anyone using this code to get a list of users, from a Front End database where the back end database is password protected?

    Comment

    Working...