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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top