Returning the sum of a column in a table

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

I've got a text box on a form--txtEARNED. In the after update property on
another text box, I want to return the sum of the "EARNED" field in the table
"tblEMPLOYEE". An Employee may have more than one record. "tblEMPLOYEE" is
not the underlying table for my form. Can someone give me some insight on
how to build this formula? Thanks...
 
Don said:
I've got a text box on a form--txtEARNED. In the after update property on
another text box, I want to return the sum of the "EARNED" field in the table
"tblEMPLOYEE". An Employee may have more than one record. "tblEMPLOYEE" is
not the underlying table for my form.


Try using something like:

Me.txtEARNED = DSum("EARNED", "tblEMPLOYEE", _
"[employee ID]=" & Me.[employee ID]
 
Back
Top