plz i have a HR info table with a discount recored for the employee assume that an employee had more than one discount in a month how i can find the sum for that discount in one text box if its a form or a field if its queries help plz![]()
plz i have a HR info table with a discount recored for the employee assume that an employee had more than one discount in a month how i can find the sum for that discount in one text box if its a form or a field if its queries help plz![]()
May be DSum function is what you are looking for.
Syntax: DSum ( expression, domain, [criteria] )
Example: DSum("UnitPrice", "Order Details", "OrderID = 10248")
no the vlues is in the same coulum
its like employee name smith had a three discount in the month i want the sum of these three to minus it from the salary.
i think you did not get the Idea.
e.g.
I have a table employee. fields Employee Code, employeeName, Discount
then:
DSum("[Discount]","Employee","[Employee Code]=21")
I assume you have already made a query that gives you the Discount that an employee has got. So this Function can be used in Forms or Report.
In a query you can also Group Discount by Sum This will also give you the total discount given to an employee in a month