Main Form and two Subforms

  • Thread starter Thread starter learning_codes
  • Start date Start date
L

learning_codes

Hi, I create an query to capture the value from 2nd subform (Forms).

For example: Forms![main form]![1st subform]![2nd subform].[players_ID]. (I am not sure I type the code properly.
This is where I put query on criteria in order to update other one field.

I am appreciated to hear how to solve this.

Thanks,
 
Hi, I create an query to capture the value from 2nd subform (Forms).

For example: Forms![main form]![1st subform]![2nd subform].[players_ID]. (I am not sure I type the code properly.
This is where I put query on criteria in order to update other one field.

I am appreciated to hear how to solve this.

I do not understand what you mean. Queries extract information from
tables and other queries, not from forms.

If you mean you have a main form, containing a Subform Control
containing a Form, which contains a Subform Control containing a
Control named [Players_ID], and wish to refer to it from an expression
or from VBA code, the proper way to refer to it would be:


Forms![NameOfMainForm]![NameOf1stSubformControl].Form![NameOf2ndSubformControl].Form![Players_ID]

A form visible in a Subform Control is not a form that is open and
shown in the Forms collection, it exists as the Form Property of the
Subform Control in which it resides -- perhaps that will help explain
the unusual-appearing name structure.
 
Larry,

MS-Access 2010 Forms and Subforms:

Can you point to a good example (easy to understand) of how to have a main form that contains two subform controls each containing forms and how to cause the change in one subform to cause a change in the second subform? I think I use the OnChange event of subform 1 to pass data to a hidden textbox in the mainform, then ReQuery subform 2, but I am looking for other, perhaps easier examples. Can you help?

Main Form -- containing Textbox named txt_Member_Id AND:

Subform Control 1 (which contains)
(sub) Form A (which contains the field: Member_Id)
Subform Control 2 (which contains)
(sub) Form B (which contains multiple instances of a Member_Id value)
When the record in Form A is changed, the Member_Id changes. I would like the associated record in Form B to change based on Member_Id in Form A.

Thanks!
 
Back
Top