Referring to a Subform's ControlSource

  • Thread starter Thread starter L.A. Lawyer
  • Start date Start date
L

L.A. Lawyer

I want to refer to a subform's ControlSource (Access 2000).

What is the code?

Thanks.
 
A subform does not have a ControlSource property. Are you wanting the
SourceObject property (which is the name of the form that is being used as
the subform)?

Assuming yes, this reference can be used in the module for the main form:

Me.NameOfSubformControlOnMainForm.SourceObject
 
A *subform control* has a Source Object, which would be;

Me![NameOfSubformControl].SourceObject

-or-

A *subform* has a Record Source, which would be;

Me![NameOfSubformControl].Form.RecordSource

but neither one has a Control Source
 
L.A. Lawyer said:
I want to refer to a subform's ControlSource (Access 2000).

What is the code?


Neither a subform control nor a form object displayed in a
subform control have a control source property. If you
meant the record source property, then the syntax would be:
Me.[subform control].Form.RecordSource
 
Back
Top