Average column in Subform

G

Gary Hull

I have a main form with a sub form

I want to Average a column on the Sub form and place the answer in a text
box on the Main form

Looking to the best way for this to be done

Thanks
 
M

Marshall Barton

Gary said:
I have a main form with a sub form

I want to Average a column on the Sub form and place the answer in a text
box on the Main form


Place a text box named txtAvgXXX in the subform's form
footer section. Set its control source expression to
=Avg(XXX)

Then the main form's text box can display the average by
using the expression:
=subformcontrol.Form.txtAvgXXX

Change the XXX to the name of the field in the subreport's
record source table/query.
 

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