Show all foreign tables from a relation
Sub ShowRelations()
Dim db As Database
Dim rel As Relation
Dim strDetail As String
Set db = CurrentDb()
Debug.Print "Relationships:"
Debug.Print
For Each rel In db.Relations
strDetail = rel.Table & " is related to " & rel.ForeignTable
Debug.Print strDetail
Next
End Sub
Related examples in the same category