This will tell you if a relationship exists between Table1 and Table2:
Dim dbs As Database, fld As DAO.Field, prp As DAO.Property, booExists As Boolean
On Error GoTo Err_Relation
booExists = False
Set dbs = CurrentDb
Set fld = dbs.Relations("Table1Table2".Fields(0)
For Each prp In fld.Properties
On Error Resume Next
If prp.Value <> "" Then
booExists = True
End If
On Error GoTo 0
Next prp
Err_Relation:
MsgBox booExists
dbs.Close
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.