Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_ScripterSQL Script Generation and Processing

Public Function RelationContainsField (
R As DAO.Relation,
FieldName As String,
Optional UseForeignName As Boolean = False
) As Boolean

Is the field/column part of the passed relationship ? In MS Access, any foreign key constraint is associated with a DAO Relation object.

r

The DAO relation object

R as DAO.Relation

(no description)

FieldName as String

The field/column name

Optional UseForeignName as Boolean = False

Compare the name from the Relation ForeignName property instead of the Name property

Call Template:

Dim b As Boolean
b = xf.Scripter.RelationContainsField(r, R, FieldName)
b = xf.Scripter.RelationContainsField(r, R, FieldName, UseForeignName)

See Also:

Example 1:

Debug.Print RelationContainsField(rel, "ProductID")   --> True
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd