AutoUpdate in Subform

  • Thread starter Thread starter phuser
  • Start date Start date
P

phuser

I have a Mainform "Payments" in this form I have 2 unbound fields, "chqdate"
and "chqnum" the subform contains all the unpaid invoices. the AfterUpdate
field in the Subform is the AmountPaid. It does update the fields but the
data isnt updated correctly,
this is what I have for the AfterUpdate Event

Private Sub PaymentAmount_AfterUpdate()

PaymentDate = chqdate
ChequeNumber = chqnum

End Sub

What else do I need to do?
 
phuser said:
I have a Mainform "Payments" in this form I have 2 unbound fields, "chqdate"
and "chqnum" the subform contains all the unpaid invoices. the AfterUpdate
field in the Subform is the AmountPaid. It does update the fields but the
data isnt updated correctly,
this is what I have for the AfterUpdate Event

Private Sub PaymentAmount_AfterUpdate()

PaymentDate = chqdate
ChequeNumber = chqnum

End Sub


That isn't using the values on the main form. It's finding
something in the subform with those names.

To retrieve the vaules from controls on the main form, use
PaymentDate = Me.Parent.chqdate
ChequeNumber = Me.Parent.chqnum

Actually the Me. is optional, but it helps clarify what
object Paremt applies to.
 
Back
Top