G
Guest
(Access XP 2002)
Trying to determine if a linked table is still linked so that I can delete
the link and make a make a connection to a different database. To do this
with regular tables, I use the following code:
Public Function IsTable(myTableName As String) As Boolean
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentData
IsTable = False
For Each obj In dbs.AllTables
If obj.Name = myTableName Then
IsTable = True
Exit For
End If
Next obj
End Function
For some reason, this code will not detect a linked table. How can I do so?
Thanks,
Bruce
Trying to determine if a linked table is still linked so that I can delete
the link and make a make a connection to a different database. To do this
with regular tables, I use the following code:
Public Function IsTable(myTableName As String) As Boolean
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentData
IsTable = False
For Each obj In dbs.AllTables
If obj.Name = myTableName Then
IsTable = True
Exit For
End If
Next obj
End Function
For some reason, this code will not detect a linked table. How can I do so?
Thanks,
Bruce