Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003

    Question Unanswered: Access freezing up

    I am using Access 2002 with windows XP. I have a Access 2002 database that runs off my laptop but links to tables on our server. The application allows for the user to select different data files then drops the current data files and links to the newly selected ones. This works fine most of the time but recently I when this happens Access has been freezing up.

    Has anyone encountered a similar issue and is there a solution?

    Thank you,

  2. #2
    Join Date
    Apr 2004
    I had no end of problems with the link removal and re-application. I found the following code to be the most stable:

    Dim dbs As Database
    Dim tdf As TableDef
    Dim strDBNewPath as String

    ' Remove All Links
    For Each tdf In CurrentDb.TableDefs
    If Left(tdf.Name, 4) <> "MSys" And (tdf.Attributes And dbAttachedTable) = dbAttachedTable Then
    CurrentDb.TableDefs.Delete tdf.Name
    End If
    Next tdf

    ' Refresh all Links
    Set dbs = OpenDatabase(strDBNewPath)
    For Each tdf In dbs.TableDefs
    If Left(tdf.Name, 4) <> "MSys" Then
    DoCmd.TransferDatabase acLink, "Microsoft Access", Trim(strDBNewPath), acTable, tdf.Name, tdf.Name
    End If
    Next tdf


Posting Permissions

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