Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    May 2005
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Linked table manager location (2003)

    I would like to set up linked tables from a MDE frontend over a LAN that I don't have access to. When I try to create a link to the UNC address (that will be used on that network) through the manager, it can not find the network and won't let me create the link.

    Is there anyway that I can force the linked reference so that when the frontend and backend are installed in the other LAN the backend will be recognized.

    Thanks nebbia

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Linked table manager location (2003)

    Not as far as I know. Access refuses to link to a non-existing database. You could do the following:

    1) Link the tables to a copy of the backend that you have access too. The path will be wrong for the end users, but that doesn't matter.

    2) Create a function that updates the links:
    <code>
    Function ForceLink()
    ' Modify as needed
    Const strBE = "serversharefolderbackend.mdb"
    Dim dbs As DAO.Database
    Dim tdf As DAO.TableDef
    Set dbs = CurrentDb
    On Error GoTo ErrHandler
    For Each tdf In dbs.TableDefs
    If Not tdf.Connect = "" Then
    tdf.Connect = ";DATABASE=" & strBE
    tdf.RefreshLink
    End If
    Next tdf
    ExitHandler:
    Set tdf = Nothing
    Set dbs = Nothing
    Exit Function
    ErrHandler:
    MsgBox Err.Description, vbExclamation
    Resume ExitHandler
    End Function
    </code>
    3) Call this function from the On Load event of the startup form, or from a macro called AutoExec.

    (If you run this function on your own PC, you'll get an error message, obviously.

  3. #3
    2 Star Lounger
    Join Date
    May 2005
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Linked table manager location (2003)

    Thanks I will try and see how the code works

    nebbia

Posting Permissions

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