Hi Don,
This line:
Code:
Set td = CurrentDb.TableDefs("test")
isn't instantiating a valid TableDef I believe because you havn't instatiated a valid DB object first. The following works for me:
Code:
Sub Test()
Dim db As DAO.Database
Dim td As DAO.TableDef
Set db = CurrentDb
Set td = db.TableDefs("test")
td.Connect = "Text;DSN=Test Link Specification;FMT=Delimited;HDR=NO;IMEX=2;CharacterSet=850;DATABASE=C:\;TABLE=test#txt"
td.RefreshLink
Set td = Nothing
End Sub
The link to the text file is refreshed successfully.
HTH,
Bob