Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_ScripterSQL Script Generation and Processing

Public Function FieldHasFkRelation (
TableName As String,
FieldName As String,
dbs As DAO.Database,
Optional CheckForPrimary As Boolean = True,
Optional CheckForForeign As Boolean = True
) As Boolean

Does the field have an FK relationship with another table ?

TableName as String

The table name

FieldName as String

The column/field name

dbs as DAO.Database

The DAO database to which the table belongs

Optional CheckForPrimary as Boolean = True

Check if this field is the primary key in an FK relationship (one on the one-to-many)

Optional CheckForForeign as Boolean = True

Check if this field is the foreign key in an FK relationship (many on the one-to-many)

Call Template:

Dim b As Boolean
b = xf.Scripter.FieldHasFkRelation(TableName, FieldName, dbs)
b = xf.Scripter.FieldHasFkRelation(TableName, FieldName, dbs, CheckForPrimary, CheckForForeign)

See Also:

Example 1:

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