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

DELETING LINKED TABLES WITH VBA

Status
Not open for further replies.

fsweb2002

Programmer
Apr 11, 2002
94
TR
hi there
I´ve read a lot on the forum about deleting linked tables...
However, I´ve been unable to find how to do the following:
I have several tables linked from 4 separate databases.

I need to delete the link of all the tables with VBA.
I then relink them (via some code whichworks perfectly).

The problem is that I can´t hardcore the different databases because sometimes they might be G:\global.mdb and D:\personal.mdb but other times it might be F:\global.mdb and C:\personal.mdb (for example)

I need to do this because several people will be installing the application on different servers/pcs and they will be using different configurations.

Any help is appreciated

 
Are your paths different or just the letters assigned to them.....ie on our drive "\\milcorp1\tec\" is the same as g: and in some cases q:
?
 
Hi there and thanks for your reply!
I posted an answer somewhere else by error!

Letters and paths might be different (eg g:\serverfs\mydatabase.mdb and on another PC d:\mainserver\fsweb\mydatabase.mdb)

The only thing that won´t change will be the name of the database...

Thanks
 
I MUST BE STUPID OR SOMETHING.
Since I do know the name of the tables, I simply have to run DoCmd.DeleteObject acTable, "eachtablename" as many times as there are tables.

I´ve answered my own stupid question.

Thanks anyway!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top