6 replies
Try
http://support.microsoft.com/support/kb/articles/Q209/8/62.ASP?LN=EN-US&SD=gn&FR=0&qry=reattach%20tables&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=ACC2000
(beware of spaces in that url)
If the url doesn't work, go to support.microsoft.com and search for "reattach tables" under you version of Access.
There used to be an example in Access 2 of how to do the job in the Solution.mdb sample database.
Hope this helps
John
Searching a little further I found a download article on mskb for the orders & solution databases for Access 2000
See article Q248674
by sankulpune
Hello Bill,
Here is what you need to do so that linked tables are automatically checked during the startup:
1) In a module, paste the following code:
Function CheckLinkedTables()
'
' Checks linked tables.
' Prompts if links not valid
'' Code by SanganakSakha 12/11/01
' No comprehensive data validation or error checking
Dim strLinkSource As String
Dim tbl As DAO.TableDef
For Each tbl In CurrentDb.TableDefs
If tbl.Attributes = 1073741824 Then
On Error Resume Next
tbl.RefreshLink
If Err.Number <> 0 Then
strLinkSource = tbl.Connect
strLinkSource = Right(strLinkSource, Len(strLinkSource) - InStr(1, strLinkSource, "="))
MsgBox "The table " & tbl.Name & "linked from " & strLinkSource & " has lost the link. Relink it !",vbOKOnly, "Error"
CurrentDb.TableDefs.Delete tbl.Name
DoCmd.RunCommand acCmdLinkTables
Err.Number = 0
End If
End If
Next
On Error GoTo 0
End Function
(Please note that it has to be function. A sub will not do.)
Close and save the module.
2) Create a new Macro (Access Macro, not VBA code) with following properties:
Action: RunCode
Function Name: CheckLinkedTables ()
(Note: RunCode can execute only functions, not subs).
Save the Macro with the Name 'AutoExec". Any other name will not do.
This macro executes automatically, every time you open the database.
This is all you need to do.
Your feedback, as to whether this helped or more assistance is needed, would be highly appreciated.
I would be glad to provide any more specific assistance you may need in this regard.
With best compliments,
SanganakSakha,
Simple And Effective Solutions To Small Problems, No QuickFixes.
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending