Relink tables

D

Dale Fye

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
 
T

Tom

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
 
A

Allen Browne

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)
 
T

Tom

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top