MichaelRed
Programmer
Trying to document the relationships. I can get the process to work, but cannot find the COMPLETE Attributes Enum.
the code to dump this into a recordset:
The object Browser shows the Attributes ENum as :
1:[tab][tab][tab][tab]Unique
2:[tab][tab][tab][tab]Dont enforce
4:[tab][tab][tab][tab]Inherited
256:[tab][tab][tab]UpdateCascade
33554432:[tab]Right
1777216:[tab]Left
The aactual values include:
4:[tab][tab][tab]Inherited
6:[tab][tab][tab]Inherited + Dont Enforce
7:[tab][tab][tab]Unique + Inherited + Dont Enforce
260:[tab][tab][tab]Inherited + Update Cascade
4356:[tab][tab][tab]WHAT IS THIS
Examining the "Attrib" field after executing the procedure,
MichaelRed
the code to dump this into a recordset:
Code:
Public Function basAllRelations()
Dim dbs As DAO.Database
Dim relLoop As Relation
Dim rst As DAO.Recordset
Dim relName As String
Dim Idx As Integer
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblRelations", dbOpenDynaset)
'Clear previous content
DoCmd.SetWarnings False
DoCmd.RunSQL "Delete * From tblRelations;"
DoCmd.SetWarnings True
'Enumerate the Relations collection. _
Record the property values of the Relations and their Fields.
For Each relLoop In dbs.Relations
With relLoop
relName = .Table & ":" & .ForeignTable
Idx = 0
While Idx <= .Fields.Count - 1
rst.AddNew
rst!db = dbs.Name
rst!Relation = relName
rst!Primary = .Table & "." & .Fields(Idx).Name
rst!Foregin = .ForeignTable & "." & .Fields(Idx).ForeignName
Idx = Idx + 1
rst!Attrib = relLoop.Properties("Attributes")
rst.Update
Wend
End With
Next relLoop
dbs.Close
End Function
The object Browser shows the Attributes ENum as :
1:[tab][tab][tab][tab]Unique
2:[tab][tab][tab][tab]Dont enforce
4:[tab][tab][tab][tab]Inherited
256:[tab][tab][tab]UpdateCascade
33554432:[tab]Right
1777216:[tab]Left
The aactual values include:
4:[tab][tab][tab]Inherited
6:[tab][tab][tab]Inherited + Dont Enforce
7:[tab][tab][tab]Unique + Inherited + Dont Enforce
260:[tab][tab][tab]Inherited + Update Cascade
4356:[tab][tab][tab]WHAT IS THIS
Examining the "Attrib" field after executing the procedure,
MichaelRed