Referring to object in SubForm

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am trying to edit the value a of checkbox in a subform by pressing a
button and running some VBA code.

However i cannot find anyway to refer to the checkbox value in the subform.

Any ideas would be appreciated.

Thanks
Paul
 
The syntax to refer to a control on a subform is

Forms!frmMainForm!ctlSubformControl.Form!ctlControlOnSubform

If the code is running on the main form, Forms!frmMainForm can be replaced
with Me. The subform isn't on the main form, it is held in a container
control called a subform control, you need to use the name of this control,
which may or may not be the same as the name of the subform itself.
 
Back
Top