Relink tables

  • Thread starter Thread starter Tom
  • Start date Start date
I usually use something simple in my Splash screen that counts the number of
records in one of the linked table.

If this generates an error, and the error has to do with not being able to
connect to the BE, then I branch to my relink code, with a call to the Open
File API (http://www.mvps.org/access/api/api0001.htm) to select the mdb
file.

HTH
Dale
 
Thanks both for your replies and suggestions.

As we develop a BE we have a tendency to add/modify fields within the BE
db, and rename to identify the latest version i.e. DataA, DataB etc. From
within the FE it appears that Access records the name of the last BE it was
linked to. How can that name be obtained thru vba?

TIA
Tom
 
You can parse the name of the back-end mdb from the Connect property of the
TableDef:

=Split([DBEngine].[Workspaces](0).[Databases](0).[TableDefs]("MyAttachedTable").[Connect],";")(1)
 
Thanks Allen

A bit of frigging around but we have it working as we want!!

Tom
Allen Browne said:
You can parse the name of the back-end mdb from the Connect property of
the TableDef:

=Split([DBEngine].[Workspaces](0).[Databases](0).[TableDefs]("MyAttachedTable").[Connect],";")(1)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Tom said:
Thanks both for your replies and suggestions.

As we develop a BE we have a tendency to add/modify fields within the BE
db, and rename to identify the latest version i.e. DataA, DataB etc. From
within the FE it appears that Access records the name of the last BE it
was linked to. How can that name be obtained thru vba?

TIA
Tom
 
Back
Top