Change one table link by vba
hi,
On 18.12.2009 10:27, K wrote:
Hi all, I got macro below which changes the link of all linked tables
in access. How can I ammend it to change only one table link with the
name "Summary".
Instead of the loop request that table from the TableDefs collection.
Public Sub RelinkSummaryTable()
'On Local Error Resume Next
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Set db = CurrentDb
Set tdf = db.TableDefs.Item("Summary")
tdf.Connect = ";DATABASE=\\Home\Document\Record.mdb"
tdf.RefreshLink
Set tdf = Nothing
Set db = Nothing
End Sub
mfG
-- stefan --
|