the easiest way to do this is to set the control source of the activerecordnametextbox to an expression. experience tells me you probably tried this but had trouble referring to the subform. i always have to use areference when i refer to subforms. here is a reference that also gives some explanation:

if and only if is a natural choice for the expression given you want to select between two values. so if you want to refer to the subform controls use something like:


you could also refer to the subform recordsource fields directly. also when refering to a subform from the mainform you can use relative references to get:


note since you weren't explicit about the edge cases like what to do if you have both a businessname and a primarycontact i just picked displaying the businessname if available and nothing if both where blank.

Related Query

More Query from same tag