Link to home
Start Free TrialLog in
Avatar of Eric Harris
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("tbl_FSL_Archive").Connect, "") <> "" Or _
   Nz(CurrentDb.TableDefs("Version1").Connect, "") <> "" 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.
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Eric Harris
Eric Harris

ASKER

Thanks Jim,

I'll give that a try.
For the Database name is it just the name or the full path of the DB
Forget that Jim.
As I'm not doing the refresh. I'm just checking the link itself
works an absolute treat
Thanks
Wicked response and brilliant solution