Lister
Z Shift
- Local time
- Today, 13:15
- Joined
- Aug 24, 2003
- Messages
- 305
Just a little help if anyone has the time and this wee project can be put to bed.
I am trying to create a function that will loop through my tables and select only those that are LINKED TABLES.
This I think I have done with the below code. (Unfinished) which tells me which of my tables are linked.
The bit that I am missing is that I want to report the LINK STRING.
So if it’s a linked table I would get something like (Debug.Print)
tblAccounts “S:\Projects\Project Accounts\Accounts0607\Admin.mdb”
etc
Well I hope that’s possible. What I don’t know and can’t seem to find is the Link Table String in the TableDefs. Am I even looking in the right place?
If someone could point me in the right direction that would be great.
Thanks
I am trying to create a function that will loop through my tables and select only those that are LINKED TABLES.
This I think I have done with the below code. (Unfinished) which tells me which of my tables are linked.
The bit that I am missing is that I want to report the LINK STRING.
So if it’s a linked table I would get something like (Debug.Print)
tblAccounts “S:\Projects\Project Accounts\Accounts0607\Admin.mdb”
etc
Well I hope that’s possible. What I don’t know and can’t seem to find is the Link Table String in the TableDefs. Am I even looking in the right place?
If someone could point me in the right direction that would be great.
Thanks
Code:
Function ShowTableAttribs()
Dim DB As Database
Dim T As TableDef
Dim TType As String
Dim TName As String
Dim Attrib As String
Dim I As Integer
Set DB = CurrentDb()
For I = 0 To DB.TableDefs.Count - 1
Set T = DB.TableDefs(I)
TName = T.Name
Attrib = (T.Attributes And dbSystemObject)
Debug.Print TName & IIf(Attrib, ": System Table", ": Not System Table")
Next I
End Function