[AccessD] Referring to a control on a subform

Arthur Fuller artful at rogers.com
Sun Sep 4 11:20:42 CDT 2005


It seems I cannot recall how you refer to a control on a subform. I want to
do a couple of different things. In each case, assume that the code is in
the parent form's module.
a) set focus to a control on the subform
With Me
    .subformName.Form.ControlName.SetFocus  'is this how?
End With
b) call a procedure in the subform's module... I assume I have to change it
from a Private to a Public sub, but what syntax do I use to call the sub
from outside? Is it
With Me
    Call .subformName.ProcedureName
End With
c) set a control's value in the subform to a specified value. Is it
With Me
    .subformName.Form.ControlName = 12345
End With

TIA,
Arthur




More information about the AccessD mailing list