Subform requeries main

  • Thread starter Thread starter CJ
  • Start date Start date
C

CJ

Hi:

I have a subform (in datasheet view) that contains a list of values that are
totalled (individually) in some Summary queries. The Total values from the
individual summary queries are part of my main form in text boxes

I am unable to make a change in the subform update the totals in the query
and therefore the totals in the main form.

My subform (fsubCostTypes) has data like:

Record 1: Survey 1000
Record 2: Drafting 2000
Record 3: Survey 1500

I have a qtotSurveyTotal and a qtotDraftingTotal that calculate the totals
for each cost type.

My main form (frmDevelopment) should show:

Survey 2500
Drafting 2000

If I change the first Survey record to be 5000 then the total on the main
should change to 6500.

Can anybody solve this for me?

Thanks in advance.
 
In the AfterUpdate event of the subform, you need to have the mainform
recalculate the fields that reference the subform. Try:
Me.Parent.SomeField.Recalc

If .Recalc doesn't work, try .Requery
 
Thanks Pat.

That's what I was working on but it looks like my syntax was out of whack
and Access was not being very helpful in straightening it out for me.
 
Back
Top