Code to delete/unlink Linked tables
From: LisaB (lbagley(ReTHis)_at_mayatech.com)
Date: 09/09/04
- Next message: Marshall Barton: "Re: Code to delete/unlink Linked tables"
- Previous message: Dirk Goldgar: "Re: writing data to a table using VBA"
- Next in thread: Marshall Barton: "Re: Code to delete/unlink Linked tables"
- Reply: Marshall Barton: "Re: Code to delete/unlink Linked tables"
- Reply: Tcs: "Re: Code to delete/unlink Linked tables"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 9 Sep 2004 14:55:54 -0400
Is the code I can write to disconnect/unlink linked tables
1. I have an Access 2000 database that has over 65 linked SQL tables.
2. I need to be able to switch between the Live data tables and Test data
tables
3. Using the Linked table manager gives me an error because some of the
links are to Views
4. Currently, I have to delete each table by hand (which is a really big
pain in the ...)
5. I have the code to rename the tables since they come in with the dbo_
prefix. Maybe there is a way to modify this code to loop through and delete
the table (but only if it is a linked table) I also have local tables that
should not be deleted
------------------------------------------
Public Function RenameTablesdbo()
Dim db As DAO.Database
Dim tbl As DAO.TableDef
Set db = CurrentDb()
For Each tbl In db.TableDefs
If Left$(tbl.Name, 4) = "dbo_" Then
tbl.Name = Mid$(tbl.Name, 5)
End If
Next tbl
End Function
-------------------------------------------
All suggestions will be greatly appreciated
Thank You
- Next message: Marshall Barton: "Re: Code to delete/unlink Linked tables"
- Previous message: Dirk Goldgar: "Re: writing data to a table using VBA"
- Next in thread: Marshall Barton: "Re: Code to delete/unlink Linked tables"
- Reply: Marshall Barton: "Re: Code to delete/unlink Linked tables"
- Reply: Tcs: "Re: Code to delete/unlink Linked tables"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|