View Full Version : FE:BE - Linked Tables - New Folders


Randomblink
09-15-2003, 11:28 AM
Ok...

I have a folder called: Front_End
I have a folder called: Back_End

Inside the Front_End folder I have a Front End DB.
Inside the Back_End folder I have a Back End DB.

The Front End DB has LINKED TABLES to the Back End DB.

How can I link the tables so they stay linked even if the two folders get moved?

For instance.
I carry the DB's back and forth from home to work and back.
At home I have a Front_End and a Back_End folder JUST LIKE THE ONES AT WORK... However, they are not located on an NT Server with settings like //pwc/wpdata/etc/etc/ and so on... They are simply C:/db/Front_End and so forth...

Everytime I get home, I have to re-link the tables. Everytime I get to work, I have to re-link the tables.

IS there a way to get the Front End DB to move one level up and see if there is a Back_End folder and link the tables to the Back End DB inside there???

I HAVE already done a couple searches and found nothing on this topic. I assumed it would have been covered at length, but found nothing that would help with my situation. Can someone help me out?

Thanks in Advance...

Opengrave
09-15-2003, 11:36 AM
Are the locations fairly static (meaning are the front end and back end locations always the same at home and always the same at work or do they get moved often)? I've got some code to re-link tables you could probably edit to make this work.

Randomblink
09-15-2003, 11:56 AM
Well...
At home AND at work I ALWAYS have the two folders...
And they are ALWAYS in a single folder...

For instance...

<< - Folder Hierarchy - >>

Databases
-> Back_End
-> -> Back_End.mdb
-> Front_End
-> -> Front_End.mdb

Does that make sense...
The ABOVE setup is true on BOTH computers...
Now at work, the folder named "Databases" is on a server. At home the folder named "Databases" is on my C: drive. But the folder named "Databases" is ALWAYS named "Databases" and inside of it is ALWAYS the two "Back_End" folder and "Front_End" folder... and inside them... well, you get the idea...

Sorry for the redundancy...
I just want to be as clear as is possible.
Hope that helps...
Any code that auto-links them would be freaking GREAT!

Opengrave
09-15-2003, 12:16 PM
Are ALL the tables in the front end to be re-linked each time are are there some tables in the front end that aren't linked?

(it matters because if they are all re-linked is it less code that specifying each table by name)

Pat Hartman
09-15-2003, 01:04 PM
There is sample code for relinking the tables in the solutions database. You can find the sample at:
http://www.access-programmers.co.uk/forums/showthread.php?s=&postid=172177#post172177

You can simply relink the tables manually by using the Linked Tables manager. Just check the box in the lower left to force Access to prompt you for the new location of the selected tables.

Randomblink
09-15-2003, 01:34 PM
OpenGrave,
It is ALL of them...

Pat, I went to that link and it was a post about Access Charts and Graphs... There were links there, but they didn't seem to cover my question...

OpenGrave... can you help me?
Thanks both of you...

Opengrave
09-15-2003, 01:47 PM
Pat's response is probably the best way because of it's simplicity.

Tools->Database Utilities->Linked Table Manager then click the box "Always prompt for new location". When the database loads it will prompt you for a path to the back end.

My solution is attached. Download the attached database, import the form called frmReLinkTables into your database then open the code window and change the path/filename near the top. I didn't test it but it is code I have used elsewhere and simplified a bit.

Pat Hartman
09-15-2003, 06:43 PM
Here is the specific link to the solutions db.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/bapp2000/html/mdbdownload.asp?frame=true

The other link was to a post that I made that consolidated ALL the useful db's that Microsoft has made for us.