Count/Sum or Ave all rows of a field

L

Les

Hi all, i am a newbie to this game and want to know if it is possible
with VBA to count up all the rows for a specific field for a table or
average or sum ?
If it is possible, could you help me with some code please.

I add up fields succesfully with the following :-

myLcPo = Nz(DSum("[Total LC PO's]", _
"tblTotalLcPO's", "[ByrName] = ""Kufner"""), 0) + Nz(DSum("[Total LC
PO's]", "tblTotalLcPO's", "[ByrName] = ""Steyn"""), 0)
 
J

Jeff Boyce

Les

No code needed. Open a new query in design mode, add the field(s), select
the "Totals" query (toolbar button). Use "Sum" to aggregate.
 
Top