Utility to look at different linked tables from same app?

L

Laurel

Is there a utility available which will quickly and easily modify the
location of linked tables? In other words, the problem I want to solve is
to use the same application on different sets of data on the same computer.
I don't want to move the tables around. I want to look at the same tables
names but in different folders on my computer, depending on what the user
chooses.

e.g., You can choose Class 1 or Class 2 or Class 3, and the application
would look at c:\Class1\Students.mdb or c:\Class2\Students.mdb or
c:\class3\Students.mdb
 
D

Douglas J. Steele

You should be able to modify the example in
http://www.mvps.org/access/tables/tbl0009.htm at "The Access Web" to
accomodate your requirements.

Essentially, you'd want to change the section


strMsg = "Do you wish to specify a different path for the Access
Tables?"

If MsgBox(strMsg, vbQuestion + vbYesNo, "Alternate data source...") =
vbYes Then
strNewPath = fGetMDBName("Please select a new datasource")
Else
strNewPath = vbNullString
End If

(which opens the standard Windows File Open dialog to allow the user to find
the new backend database) with code to let them choose the folder, and set
the value for strNewPath once you know what folder they want.
 

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