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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert and delete link tables using vba

Status
Not open for further replies.

jack1080

Programmer
Jun 2, 2007
34
0
0
MY
I have two table which is c:\db1.mdb; c:\db2.mdb

The user is currently using c:\main.mdb
In main.mdb, I have a form, and have a combobox with two value, which is db1.mdb and db2.mdb.

If the user choose db2.mdb, delete all the current db1.mdb link tables(if there is any), and import all the tables from db2.mdb as link table
If the user choose db1.mdb, delete all the current db2.mdb link tables(if there is any), and import all the tables from db1.mdb as link table

And I need to perform some vba on the afterUpdate event of combobox.

My question is, how to
1)delete all link tables using vba
2)Import all tables from a certain mdb file as linked table using vba?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top