Hello Guys,
I have a form with a textbox [txtGrandTotal], which accurately sums a totalPrice every time the form is saved. I am trying to insert that value into a table every time it is updated with the date. I have tried the code on the "After Update" and "Change" events of the textbox but nothing is inserting. Can you please tell me what I am doing wrong? Here is the code
I have a form with a textbox [txtGrandTotal], which accurately sums a totalPrice every time the form is saved. I am trying to insert that value into a table every time it is updated with the date. I have tried the code on the "After Update" and "Change" events of the textbox but nothing is inserting. Can you please tell me what I am doing wrong? Here is the code
Code:
Private Sub txtGrandTotal_Change()
Dim strSQL As String
strSQL = "INSERT INTO TblGrandTotals(ChangeDate,GrandTotal)VALUES(#" & Date & "#," & Me.txtGrandTotal.Value & " )"
DoCmd.RunSQL strSQL
End Sub