how to requery a subform after a record added in another subform

G

Guest

Greetings all,

I have a main form (frmClients) with two subforms (subVisits)
(subAccount). I got the subforms to reflect what the main form is
showing by linking master and child fields (I think--newbie here). Now
I need the second subform (subAccount) to update when I add a visit in
the subVisits subform. I assume that the AfterUpdate would do it, but
I cant figure out what the code is to update another subform would be.
Not Me.Requery but I assume something like it. Any assistance?


Thanks in advance.


DB
 
A

Allen Browne

Assuming that subVisits and subAccount a getting records from different
tables, it should not be necessary to requery, but something like this
should do it:

Private Sub Form_AfterUpdate()
Me.Parent![subAccount].Form.Requery
End Sub
 

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