Gustav Brock
Gustav at cactus.dk
Thu Feb 18 08:53:28 CST 2010
Hi Max
So you have compound indexes (or indices)? If not, only one field belongs to the index that is tied to the relation.
/gustav
>>> max.wanadoo at gmail.com 18-02-2010 15:29 >>>
Can anybody help me with the following code. It doesn't seem to want to
give me anything other that the first field join.
Thanks
Max
For Each Rel In CurrentDb.Relations
With Rel
sql = sql & "Name: " & .Name & vbCrLf
sql = sql & "Attributes: " & .Attributes & vbCrLf
sql = sql & "Table: " & .Table & vbCrLf
sql = sql & "ForeignTable: " & .ForeignTable & vbCrLf
sql = sql & "Fields:" & vbCrLf
For Each Fld In .Fields
sql = sql & "Field: " & Fld.Name & vbCrLf
Next Fld
End With
sql = sql & vbCrLf
Next