C
CT
I am trying to refresh an existing link to an external
database. However, I have the following error at
the .refreshlink statement: Error 3055 DAO.tabledef Not
a valid file name. Please point out problem. CT.
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim i As Integer
Dim strTBLNAME As String
Set db = CurrentDb()
For i = 0 To db.TableDefs.Count - 1
strTBLNAME = db.TableDefs(i).Name
MsgBox strTBLNAME
Next
'One of the strTBLNAME values is "ALLPLT" from
for/next loop above.
'What is missing/incorrect in the following code:
'Set db = CurrentDb()
Set tdf = db.TableDefs("ALLPLT")
'strCURRENTDIRVALUE is path&name for external DB
tdf.Connect = (";DATABASE=" & strCURRENTDIRVALUE)
tdf.RefreshLink 'Error occurs at this statement
Set tdf = Nothing
Set db = Nothing
database. However, I have the following error at
the .refreshlink statement: Error 3055 DAO.tabledef Not
a valid file name. Please point out problem. CT.
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim i As Integer
Dim strTBLNAME As String
Set db = CurrentDb()
For i = 0 To db.TableDefs.Count - 1
strTBLNAME = db.TableDefs(i).Name
MsgBox strTBLNAME
Next
'One of the strTBLNAME values is "ALLPLT" from
for/next loop above.
'What is missing/incorrect in the following code:
'Set db = CurrentDb()
Set tdf = db.TableDefs("ALLPLT")
'strCURRENTDIRVALUE is path&name for external DB
tdf.Connect = (";DATABASE=" & strCURRENTDIRVALUE)
tdf.RefreshLink 'Error occurs at this statement
Set tdf = Nothing
Set db = Nothing