After Update event on form inputting data into a subform?

  • Thread starter Thread starter WildlyHarry
  • Start date Start date
W

WildlyHarry

I have a form with a subform. I want to set the After Update field for the
form to populate data into a field on a subform. The form is linked to one
table, the subform is linked to a different table. I would typically use
code like:

After Update

me.field1.value = "MONKEYS"

However, I cannot find the reference for the field on the subform. Any
suggestions? Thanks in advance for the help.
 
I have a form with a subform.  I want to set the After Update field forthe
form to populate data into a field on a subform.  The form is linked toone
table, the subform is linked to a different table.  I would typically use
code like:

After Update

me.field1.value = "MONKEYS"

However, I cannot find the reference for the field on the subform.  Any
suggestions?  Thanks in advance for the help.

To reference a field in the subform, use this structure: Forms!
MainFormName!SubFormName!Control

Keven Denen
 
I have a form with a subform. I want to set the After Update field for the
form to populate data into a field on a subform. The form is linked to one
table, the subform is linked to a different table. I would typically use
code like:

After Update

me.field1.value = "MONKEYS"

However, I cannot find the reference for the field on the subform. Any
suggestions? Thanks in advance for the help.

Try

Me!subformname.Form!controlname =

Note that this will insert into whichever record is currently active on the
subform, and from the mainform, you can't necessarily control or tell which
record that might be; it sounds like a rather dangerous thing to do!
 
Back
Top