Reference a field on a subform from another form

RevJeff

Registered User.
Local time
Today, 17:45
Joined
Sep 18, 2002
Messages
129
Hi,

I am trying to reference a field on a subform from another form. So basically I have FormA - SubformA - FieldA(CheckBox) and then I have FormB - Field B.

When I click a button on FormB, I want to check to see if FieldA is checked or not. Then, depending if it is checked or not, certain data if populated into FieldB.

I've tried:

If Forms!FormA!SubformA.FieldA = -1 Then ....
If Forms!FormA!SubformA.Form.FieldA = -1 Then ....

and a few other varients. Can someone please show me the correct syntaxs.


Thanks,
Jeff
 
Either syntax will work but the second one is "more" correct and is unlikely to fail in future versions whereas the first version may fail if some MS programmer decides to tighten up the syntax checks.

However - the referenced form MUST be open if you want to reference a control on it.
 

Users who are viewing this thread

Back
Top Bottom