VBA to unlink Access Database

snypa

Registered User.
Local time
Today, 10:34
Joined
Feb 2, 2009
Messages
29
Hi Guys

I was just wondering what would be the code to unlink all linked tables in an Access Database. Could someone please help

Thanx in advance
 
IF you use the delete object method it removes the table from the front end but does not actually delete the table.

There may be better methods but this works ok.
 
Thanx for the response, I thought of that but It'll have write the names of all the tables which is a bit tedious, Is there are way I can delete/unlink all the linked tables. mayby create a loop that lists all the names of the tables
 
What version of Access are you using. Can you not use the Link Table Manager?
 
I'm developing in Access 2007 for use in 2003, I'll give that a shot but the users might get confused when they see the link table manager
 
You are confusing me now? What have the users got to do with the Link Table Manager?
 
I want the users to be able to link and unlink tables at will because the databases they are linking to are change every week. These users aren't that tech savvy so if they press the unlink button and the link manager table pops up they'll have a heart attack so it would be ideal for them to click unlink and everything happens in the background
 
Even more confused!

Your front end will have linked tables that contain data stored in a central location (server). The data in said tables changes on a day to day basis. The structure of the tables and relationships between each table doesn't. So why the need to unlink the tables and then relink them? Can you explain by way of an example.
 
What version of Access are you using. Can you not use the Link Table Manager?

fortheluvofgawd, people. the guy asked a simple question: how do you do it in vba?

he didn't ask if he could do it with the linked table mgr. he didn't ask if he could do it by deleting tables. he didn't ask if he could do it by clicking his freaking heels together three times and saying, "Unlink you tables, unlink you tables, unlink you tables!"

why don't you just answer his bloody question? Because you don't know the answer, that's why. So if you don't know the answer, why don't you STFU or FIND the answer?
 
Resurrecting a 2-year old post (!) in order to bitch, and not even provide the solution, accomplishes what exactly?

I'd suggest next time you get overwhelmed by a fit of righteous indignation, to sit on it.
 

Users who are viewing this thread

Back
Top Bottom