Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding the sum of an entire column from a sub form

Status
Not open for further replies.

revz

Technical User
Apr 18, 2001
10
0
0
GB
Heya,

I have a form, with a table as a sub form on it.

I am wanting to add up a column of fields, but need to know how to go about it.

I know that it would include using a while loop to figure out if the loop is at EOF. If the it is, to stop, otherwise move to the next record and the field to a variable, var = var + current.field

Any ideas?

Many Thanks,

Tom Griffiths
tom@vscan.org
 
Actually, if it is a recordset, you can just use "DSum" usuing the domain of the Recordset.Column as the domain.
An Aggregate column using the same criteria for recordselection as the subform "grid" will also work.
MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top