Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Tables

Status
Not open for further replies.

Brogrim

Technical User
Jul 28, 2000
184
IE
I want to email the front end of an application to a client. When they recieve it and open it the application looks for the path addres that I have been using.

Is there any way I can get the application to link the tables from a specific location:

F:\Master Database Folder\Back End\Back End 03 03 06

Thanks in advance
 
Perhaps something like:
Code:
Sub UpdateConnect()
Dim db As DAO.Database
Dim tdf As DAO.TableDef

Set db = CurrentDb
For Each tdf In db.TableDefs
    If tdf.Connect <> "" Then
       'Debug.Print tdf.Connect
       tdf.Connect = ";DATABASE=F:\Master Database Folder\Back End\Back End 03 03 06\Tek-Tips.mdb"
       'Debug.Print tdf.Connect
       tdf.RefreshLink
    End If
Next
    
End Sub
 
Thanks alot Remou

You have just opened up alot of possibilities for me.

This is the first time I have done this for a client. How does the client usually get to the command by a pull down menu, a button on a form.What would you suggest

Also, could error handling be added to the code to let the client know that the tables have relinked.

Thanks again

 
It seems to me that it might be best to include a small table with a re-linked flag. When the database is opened, the main menu could check for the re-linked flag, and if it is not true further processing could be carried out. The user could either be prompted to enter the location for back-end tables (perhaps with a file dialog) or be asked to confirm a location (perhaps an additonal field in the small table).

Error coding is always a good idea and should be easy enough to add.

By 'get to the command' do you mean Tools->Database Utilities->Linked Tables Manager, or had you something else in mind?
 
Yes, I have built in Menu's and I would like to add it like

File -> Link Tables

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top