Do Cmd code for after update

G

Guest

I have a main form called “customersâ€
I have a subform in the “customers†form called "billsopenvalue"
I have a commandbutton on the “customers†form which is opening a pop-up
form with the name “receivedpaymentâ€.
So, if I change the “receivedpayment†Form I would like that my Form
â€billsopenvalue†(actually the only field which needs to be updated is the
field “restingâ€) gets immediately updated.
I have tried to do this with the following command:
DoCmd.Requery "sfrmbillsopenvalue"
but billsopenvalue is a subform from “customers†and not from
“receivedpayments†–
Can someone help me to give me the correct After update code.
Thank you very much in advance
Klaus
 
G

Guest

I tried now in the AfterUpdate Event procedure for the field paymentamount in
the form receivedpayments :

Private Sub Form_AfterUpdate ()
DoCmd.Requery Forms!customers!billsopenvalue
End Sub
and

Private Sub Form_AfterUpdate ()
DoCmd Forms!customers!billsopenvalue.requery
End Sub

and
Private Sub Form_AfterUpdate ()
Forms!customers!billsopenvalue.requery
End Sub

Is not working but I think I have somehow as well to mention the fieldname
which should be updated or not? The field name would be form "customers",
subform "billsopenvalue", fieldname "resting" .

Do you have any other idea?
Thanks
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top