Update parent record from child record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a child subform connected to the parent. I wish to update a field in
the parent record from a field in the child record. I want the field in the
parent record to reflect the last information that I keyed into the child
record. Is this possible?
Thanks,
TomC
 
I have a child subform connected to the parent. I wish to update a field in
the parent record from a field in the child record. I want the field in the
parent record to reflect the last information that I keyed into the child
record. Is this possible?
Thanks,
TomC

It's possible... but it's almost certainly incorrect table design to
store this information redundantly. A given parent record will have
MANY child records, typically - what do you mean by "the last
information"? The newest added child record? The most recent change to
an existing child record?

What you would do (if you insist... though I'm queasy about offering
this advice) is use the Subform's BeforeUpdate event:

Private Sub Form_BeforeUpdate(Cancel as Integer)
Parent!controlname = Me!controlname
End Sub

using of course the appropriate control names.

John W. Vinson[MVP]
 
Back
Top