I am running this code but am receiving the error in the subject;
The error appears on the line If Len(tdf.Connect) > 0 Then
Anyone can help please,
thanks
Code:
Private Sub cmdUpdate_Click()
Dim dbsCur As Database
Set dbsCur = OpenDatabase("C:\Users\Gavin\Front End\MyFile.accdb")
Dim tdf As TableDef
Set tdf = CurrentDb.TableDefs("tblCSVData")
If Len(tdf.Connect) > 0 Then
tdf.RefreshLink
End If
Set dbsCur = Nothing
End Sub
Anyone can help please,
thanks