swatters
Jan 6th, 2000, 07:45 AM
I have a an access database with a link to a table in another access database on a second PC. I am attempting to verify that the connection to the linked table is good before accessing the linked table as follows:
On Error Resume Next
' Check for failure. If can't determine the name of
' the first field in the table, the link must be bad.
varRet = strDB.TableDefs(strTable).Fields(0).Name
If Err.Number <> 0 Then
CheckLink = False
Else
CheckLink = True
Unfortunately VB is able to return the field name even if the network connection is down. Can anyone tell me how to verify if the connection is good?
Steve
On Error Resume Next
' Check for failure. If can't determine the name of
' the first field in the table, the link must be bad.
varRet = strDB.TableDefs(strTable).Fields(0).Name
If Err.Number <> 0 Then
CheckLink = False
Else
CheckLink = True
Unfortunately VB is able to return the field name even if the network connection is down. Can anyone tell me how to verify if the connection is good?
Steve