Bilbo_Baggins_Esq
Registered User.
- Local time
- Today, 00:33
- Joined
- Jul 5, 2007
- Messages
- 586
Hi All and sorry to bother you with what may prove to be rather obvious to you but seems to be escaping me.
For reasons I need not get into as it generally proves to be a distraction, I need to document the relationships in databases.
I've been playing around with .Relations with some success.
I can easily get the relationship's name, Table Name, Table Field, and ForeignTable.
However, despite lots of digging into the other properties and attributes associated here, I cannot yet figure out how or where to get the:
ForeignTable field
The type of relationship (1:1,1:many,many:many)
I have looked at the Access Developers reference and searched the internet.
The Dev Ref only has a listing for “,Relations” with no detailed reference for the properties and no examples.
When I search the internet I find a ton of references to actually create relationships, but so far zero listings for just reading them.
For reasons I need not get into as it generally proves to be a distraction, I need to document the relationships in databases.
I've been playing around with .Relations with some success.
I can easily get the relationship's name, Table Name, Table Field, and ForeignTable.
Code:
For i = 0 To objDestDB.Relations.Count - 1
With rsMigrateRels
.AddNew
!RelNumber = i
!RelAttributes = objDestDB.Relations(i).Attributes
!RelFields = objDestDB.Relations(i).Fields.Count
!RelFieldsName = objDestDB.Relations(i).Fields(0).Name
!RelForeignTable = objDestDB.Relations(i).ForeignTable
!RelName = objDestDB.Relations(i).Name
!RelPartialReplica = objDestDB.Relations(i).PartialReplica
!RelProperties = objDestDB.Relations(i).Properties.Count
!RelTable = objDestDB.Relations(i).Table
.Update
End With
Next i
However, despite lots of digging into the other properties and attributes associated here, I cannot yet figure out how or where to get the:
ForeignTable field
The type of relationship (1:1,1:many,many:many)
I have looked at the Access Developers reference and searched the internet.
The Dev Ref only has a listing for “,Relations” with no detailed reference for the properties and no examples.
When I search the internet I find a ton of references to actually create relationships, but so far zero listings for just reading them.
Last edited: