Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2007

    Question Unanswered: Relink table problem

    When users open my db the following code should re-link the tables.

    Private Function ReconnectTables() As Boolean
    On Error Resume Next
        Dim tdf As DAO.TableDef
        Dim dbs As DAO.Database
        Dim strPath As String
        Dim strConnect As String
        Set dbs = CurrentDb
        'Set the path to the backend
        strConnect = "\\Nacpfp02\Ds_nips-data_tx\vibePublisher\vPBE.mdb"
        'Reconnect the tables
        For Each tdf In dbs.TableDefs
            If tdf.Connect <> "" Then
                tdf.Connect = ";DATABASE=" & strConnect
            End If
        Set dbs = Nothing
        If Err.Number = 0 Then ReconnectTables = True
    End Function
    First of all, I have ULS enabled ..
    This works fine when I log in. When other users log in it does not work. I am the only Admin, and all other users are in the group "Full Data User".

    When another user logs in and the code runs the following error is generated:
    "You do not have the necessary permissions to use the 'CurrentUsers' object. Have your system administrator or the person who created this object establish the appropriate permissions for you."

    My thought is that I just need to grant the appropriate permissions before the code runs and then revoke those permissions after the tables are re-linked.

    So the question ...
    What permissions are needed to re-link the tables

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 12
    Or is the question - why do I need to re-link the tables with every application load?
    Home | Blog

  3. #3
    Join Date
    Jun 2007
    I have not worked with linked tables very much in Access. I have implemented code that automaticaly deploys a new Front End Client when I make changes. Since the Back End is on a NAS Share and ULS is enabled, I thought it would be a good idea to ensure that the tables were linked properly.

    Is this overkill? Should I not worry about it?

  4. #4
    Join Date
    Dec 2004
    Madison, WI

    Code to relink tables

    Here's some code I have that I use to link in tables. It might be worth a look.
    Attached Files Attached Files
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts