make sure links are current

  • Thread starter Thread starter LGarcia
  • Start date Start date
L

LGarcia

Hi All,
I have a front end db linked to tables in a back end db. My user changed the
name of the back end db (for very good reasons) and this caused all kinds of
havoc when they opend one of my forms. I added some code to evaluate if the
table existed and it returns true every time. When I looked at the linked
table manager the links were from the original back end db. Can this be why
it always returns as true? How can I evaluate if the current table links are
valid? I'm using this to return the path of the linked file:
strDB = CurrentDb.TableDefs("tblIntakeCV").Connect

I don't want to relink but I want to direct my user to use a button on my
main switchboard that allows users to choose a back end db and the links are
established through code.
Hope someone can help!

LGarcia
 
"Back-End" is a term we use for human convenience, not something that Access
registers. Access registers the location of *each* linked Table separately
in the Connect Property of each Table in the Front-End. In effect you can
have 1 Front-End "connects" to multiple Back-Ends.

When your user changes the name of the Back-End mdb file, this won't affect
the linkages in the Front-End, hence the links still point to the old
Back-End name.

You may be able to use the code from The Access Web article:

http://www.mvps.org/access/tables/tbl0009.htm
 
Back
Top