K
Kahuna
Hi folks
I use code similar to the following to iterate through the relations
collection to get a listing of all relationships in a particular Db.
Sub EnumRelation()
'*********************************Test Code
Dim dbs As Database
Dim fld As Field
Dim rel As Relation
Set dbs = CurrentDb
For Each rel In dbs.Relations
MsgBox ("Name: " & rel.Name & ", Table: " & rel.Table & ", Forieng
Table: " & rel.ForeignTable)
Next rel
Set dbs = Nothing
End Sub
I need to include both field names included in the relationship however and
I am struggling with the syntax.
Tried a combination including:
rel.Fields.(0)
rel.Fields.Field(0)
etc What's the correct syntax for this reference?
TIA
I use code similar to the following to iterate through the relations
collection to get a listing of all relationships in a particular Db.
Sub EnumRelation()
'*********************************Test Code
Dim dbs As Database
Dim fld As Field
Dim rel As Relation
Set dbs = CurrentDb
For Each rel In dbs.Relations
MsgBox ("Name: " & rel.Name & ", Table: " & rel.Table & ", Forieng
Table: " & rel.ForeignTable)
Next rel
Set dbs = Nothing
End Sub
I need to include both field names included in the relationship however and
I am struggling with the syntax.
Tried a combination including:
rel.Fields.(0)
rel.Fields.Field(0)
etc What's the correct syntax for this reference?
TIA