I want to run an execute SQL statement which update a field in a table after clicking on "save" button
here the code I use:
here I should Run my update statement which is: "UPDATE balanceT SET closing_balance = v_final_balance "
But How should I do that?
THANKS.
here the code I use:
Code:
Private Sub save_Click()
On Error GoTo Err_save_Click
Dim v_balance As Double
Dim v_final_balance As Double
DoCmd.RunCommand acCmdSaveRecord
v_balance = DoCmd.OpenQuery("SELECT closing_balance FROM balanceT")
v_final_balance = v_balance - Forms![cash].[cash_out_usd] + Forms![cash].[cash_in_usd]
But How should I do that?
THANKS.
Comment