Thread: Linked Table
09-19-02, 02:48 #1Registered User
- Join Date
- Aug 2002
Unanswered: Linked Table
I want to have several linked table, from several file. For this, from Ms Access I can just get external data, and link the table, take from several file. When I want to change, I just go to linked table manager and modify them.
Although this is "quite" easy, I still want to create "easier" interface to change the linked table source.
Can I have a combo box in a form to choose the mdb file that will be linked? The combo box will consist of file name with some naming convention. For example, I want to link tblEmployee to either emp001.mdb, emp002.mdb, emp003.mdb, etc...
1. How to list all file (on specified directory) with the criteria: emp*.mdb?
2. After I get the file name, how to link the current employee table to the employee table this selected file?
I hope all of them can be done from VB code.
09-19-02, 19:23 #2Registered User
- Join Date
- Sep 2002
- Coventry, Warwickshire, UK
Have a look at the methods in the FileSystemObject object which will allow you to find the names of files in a drectory. You should then be able to build up the RowSource for the combo box.
Then look at the TransferDatabase method which will allow you to link tables out of an other Access database.Roger Hampson
XI - ecs (UK) Ltd