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?