Requery a subform

D

Don

I have a Main form with 2 subforms. One of the subforms, frmSub1 contains
records and the other subform, frmSub2 is a sum of the records in frmSub1.
Each time I update records in frmSub1, I want frmSub2 to requery to post the
new totals. My thought was to add the following code in frmSub1 AfterUpdate
Event:

Forms!frmSub2.Requery

The code errors out saying that the form cannot be found. Where am I going
wrong?

Thanks,

Dennis
 
R

ruralguy via AccessMonster.com

Bookmark Klaus's link. It is a good one. For this reference you can use:

Me.Parent!frmSub2.FORM.Requery

If You wanted to use the Forms collection as you started with then:

Forms!MainFormName!SubFormControlName.FORM.Requery
 

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