Eric Harris
asked on
check connection to linked table (Access 2003)
Hi,
I have an access 2003 database.
I have several linked tables to linking to tables in other databases.
These are in different locations on our network.
Occasionally I have had problems.
Sometimes relating to Network, and sometimes when the other databases have been inadvertently moved.
What I'd like to do Is just before I do something critical is to check that everything is still Ok.
I've searched the knowledge base and there was a good solution whereby I check the tabledefs.
So I thought I's check 1 table for each of my external databases a(as follows)
.......................... ..
If Nz(CurrentDb.TableDefs("tb l_FSL_Arch ive").Conn ect, "") <> "" Or _
Nz(CurrentDb.TableDefs("Ve rsion1").C onnect, "") <> "" Then
Else
MsgBox "not linked table"
End If
.......................... .......... .
However, this doesn't seem to work. I have moved one of the DB's away and it still says its linked OK.
Does anyone have any other ideas.
Ideally I'd like to capture both the network issue, and the missing DB.
I have an access 2003 database.
I have several linked tables to linking to tables in other databases.
These are in different locations on our network.
Occasionally I have had problems.
Sometimes relating to Network, and sometimes when the other databases have been inadvertently moved.
What I'd like to do Is just before I do something critical is to check that everything is still Ok.
I've searched the knowledge base and there was a good solution whereby I check the tabledefs.
So I thought I's check 1 table for each of my external databases a(as follows)
..........................
If Nz(CurrentDb.TableDefs("tb
Nz(CurrentDb.TableDefs("Ve
Else
MsgBox "not linked table"
End If
..........................
However, this doesn't seem to work. I have moved one of the DB's away and it still says its linked OK.
Does anyone have any other ideas.
Ideally I'd like to capture both the network issue, and the missing DB.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Forget that Jim.
As I'm not doing the refresh. I'm just checking the link itself
works an absolute treat
Thanks
As I'm not doing the refresh. I'm just checking the link itself
works an absolute treat
Thanks
ASKER
Wicked response and brilliant solution
ASKER
I'll give that a try.
For the Database name is it just the name or the full path of the DB