...
Dim x As Integer, y As Integer
x = 1
y = DMax("ID", "TTableLink")
Do Until x > y
Dim rst As Recordset, sqlstmt As String
Set dbs = CurrentDb
sqlstmt = "Select * from [TTableLink] where [ID] = " & x & ""
Set rst = dbs.OpenRecordset(sqlstmt, dbOpenDynaset)
If rst.BOF Then
''
Else
Dim ntablelocal As String, ntablelocaltemp As String, ntablelink As String
ntablelocal = rst!NTable; ntablelink = rst!NTable
ntablelocaltemp = ntablelink & "Temp"
'''' put link table to local with "Temp"
CurrentDb.Execute "Select * into [" & ntablelocaltemp & "] from [" & ntablelink & "]"
''''delete link table
DoCmd.SetWarnings False
DoCmd.DeleteObject acTable, ntablelink
''''rename new table with oldname(without "Temp")
DoCmd.Rename ntablelocal, acTable, ntablelocaltemp
DoCmd.SetWarnings True
End If
x = x + 1
Loop
...