Results 1 to 3 of 3
  1. #1
    cbh35711 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    40

    Speeding up Table Linking Times

    Hello all,



    I have a front-end and back-end part of a database. In order to make updates to the front-end, i have a local copy of the back-end on my machine. This makes it much quicker to design. Once i make the design changes, i relink the front-end to the network back-end. This relinking takes forever. Ok that's not fair, it takes about 4 minutes. These 4 minutes drive me crazy.

    In order to make this faster, i created a routine to switching between the Local and Network copies of the back-end. It runs just as slowly as the manual relinking does.

    Code:
    Function relinkTables()
    Dim tdf As DAO.TableDef
    Dim db As Database
    
    
    Set db = CurrentDb
     
        For Each tdf In CurrentDb.TableDefs
            ' check if table is a linked table
            If Len(tdf.Connect) > 0 Then
                If (tdf.Connect = ";DATABASE=C:\Users\Repository.accdb") Then
                    tdf.Connect = ";DATABASE=\\XXX.Repository.accdb"
                Else
                    tdf.Connect = ";DATABASE=C:\Users\Repository.accdb"
                End If
            tdf.RefreshLink
            End If
        Next
    End Function
    The part of the code that takes most of the time is tdf.refreshlink. Is there a fast way of doing this, or am i stuck because of my slow network?

    Thank you,

    Chris

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    I use much the same code, except for the check on if table is linked. I expect network performance can be a factor.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    cbh35711 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    40
    Yeah. I was thinking the same thing June. Just hoping someone had a magic refresh.freakingfaster command...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Count How Many times a value appears in a table
    By younggunnaz69 in forum Queries
    Replies: 1
    Last Post: 10-19-2011, 10:29 PM
  2. Question about Times in Access Table
    By Littlma in forum Access
    Replies: 1
    Last Post: 08-02-2011, 07:00 AM
  3. Using lookup data for table 1 mutible times in table 2
    By mbjazz in forum Database Design
    Replies: 5
    Last Post: 04-26-2011, 01:18 AM
  4. Speeding up Macros
    By salisbut in forum Programming
    Replies: 3
    Last Post: 07-19-2010, 04:02 PM
  5. Table linking
    By emccalment in forum Access
    Replies: 7
    Last Post: 01-28-2010, 03:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums