V
Vensia
Dear all,
I'm using the following code to refresh link :
Set db = CurrentDb
For Each tdf In db.TableDefs
If Len(tdf.Connect) > 0 Then
tdf.Connect = ";DATABASE=" & strFileName
Err = 0
On Error Resume Next
tdf.RefreshLink
If Err <> 0 Then
RefreshLinks = False
DoCmd.Hourglass False
Exit Function
End If
End If
Next tdf
But the above code doesn't work for password protected database.
How should I modify the code ?
Thanks.
Vensia
I'm using the following code to refresh link :
Set db = CurrentDb
For Each tdf In db.TableDefs
If Len(tdf.Connect) > 0 Then
tdf.Connect = ";DATABASE=" & strFileName
Err = 0
On Error Resume Next
tdf.RefreshLink
If Err <> 0 Then
RefreshLinks = False
DoCmd.Hourglass False
Exit Function
End If
End If
Next tdf
But the above code doesn't work for password protected database.
How should I modify the code ?
Thanks.
Vensia