hi, i got a table with this fields
employee_name salary
i know how to display records of a specific employee, now i want to get his/her total salary based on his/her number of records
thx in advance :wave:
Printable View
hi, i got a table with this fields
employee_name salary
i know how to display records of a specific employee, now i want to get his/her total salary based on his/her number of records
thx in advance :wave:
SQL : SUM function.... :: http://www.techonthenet.com/sql/sum.php :wave:
Private Sub Command1_Click()
Adodc1.RecordSource = "SELECT SUM(salary) AS totalsalary FROM Table2;"
Adodc1.Refresh
End Sub
how do i pass the value to a variable?
Perhaps something like:
Code:Dim TS
TS = Adodc1.RecordSet.Fields(0).Value
Thread moved to 'Database Development' forum (the 'VB6' forum is only meant for questions which don't fit in more specific forums)