Form Requery

G

Guest

I am working on a financial tracking system based on only three primary
tables, but with a variety of queries to perform calculations. I am using
three forms to prove ledger style entry pages with totals list in other
subforms from the appropriate queries. The problem is, when I change
information in one sumform or add a new record from my ADD Ledger Entry form,
I can't figure out how to update the whole page. Is there a way to requery
other items on a form when changing info on another subform? Help me! Thank
You
 
G

Guest

If I understand you correctly, you want to requery a parent form when you
make a change in one of its subforms. If that it, this statement will do the
trick:

Me.Parent.Requery

If the parent form has other subforms that have linked fields, they will
requery automatically as well.

HTH,
Barry
 
G

Guest

Thank you for responding so quickly. Where do I put that statement? I am not
a Visual Basic wiz. Thanks.
 
G

Guest

You could probably put it in the subform's AfterUpdate event. Select the
subform, click the elipsis (...) at the end of the After Update event line,
and select Code Builder. Enter it in that event:

Private Sub Form_AfterUpdate()
Me.Parent.Requery
End Sub

Barry
 
G

Guest

Worked like a charm! Thank you so much.

Barry Gilbert said:
You could probably put it in the subform's AfterUpdate event. Select the
subform, click the elipsis (...) at the end of the After Update event line,
and select Code Builder. Enter it in that event:

Private Sub Form_AfterUpdate()
Me.Parent.Requery
End Sub

Barry
 

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

Similar Threads


Top