Subform Question

C

Carmen

I have a form that has two subforms. One of my subforms
called sub_DailyActivty opens up to show daily records in
datasheet view. The other subform which is called
sub_dailysum calculates the total minutes in the duration
field in the sub_DailyActivity subform. How can I get it
so that if the staff add a record, or edit a record to
automatically update this sub_dailysum total?
 
W

Wayne Morgan

In the AfterUpdate event of the sub_DailyActivity subform you need to
Requery or Recalc the other subform. The code would be similar to this:

Me.Parent.sub_DailySum.Form.Recalc

Where I have sub_DailySum, this would actually be the name of the subform
control on the main form, not the name of the subform. However, they are
frequently the same. If Recalc doesn't work, try 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