Hi Capitala,
not sure if I understand entirely your objective, but maybe these options may lead you closer.
In the ControlSource property of an unbound textbox, you can use DSUM, which gives a total of all records, in a particular field, in accord with the criteria.
=DSUM("fieldname","tablename","tablename.EmployeeN o = 13 And tablename.att_date Between #12/31/03#And#12/31/04#")
you can use this in VBA also, if you need to stipulate certain more criteria, or use a math equation etc...
Without knowing further, how you are going about the calculation, I'm not sure what else to suggest. eg once you've restricted the employee# and the date worked, do you now multiply wage by hours, is the salary automatically entered provided the employee worked that duration?
you could even open a recordset, specify the criteria, make your calculations & update a particular field accordingly.
Please elaborate, if need be.
Hope this helps, good luck!
|