Sub Form

J

John

Hi,
I have a subform which needs to check the main form for a checkbox value
(true or false).
How do I make the subform look at the mainform and verify the checkbox
value?

The Main form is called frmDetails
The CheckBox is called cbCollected
The Subform is called sfComponents

I assume that I need to put the code in the OnCurrent property as an
EventProcedure but then I am stuck.

Kind Regards

John
 
K

Ken Snell \(MVP\)

Easiest way is to use the Parent property:

ValueOnMainForm = Me.Parent!cbCollected.Value

Otherwise, you can use the full reference to the form:

ValueOnMainForm = Forms!frmDetails!cbCollected.Value
 
J

John

Perfect Ken
Thanks

Regards

John

Ken Snell (MVP) said:
Easiest way is to use the Parent property:

ValueOnMainForm = Me.Parent!cbCollected.Value

Otherwise, you can use the full reference to the form:

ValueOnMainForm = Forms!frmDetails!cbCollected.Value
 

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

Top