Hi guys! My project is an installment payment program (VB.NET 2008) and I use MS Access as database. When the user enrolls a new customer, it will automatically generate amounts per term in the table based on how many terms is entered in the enrollment window. The code of this works fine.
Another form (Premiums Form) asks the user to input the premium paid by the customer, and the code of the save button looks something like this:
Private Sub btnPremSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPremSave.Click
sqlQrySave = "UPDATE MyTable SET custnam = '" & cboCustNam.Text & "'," _
& "premno = '" & txtPremNo.Text & "', premamt = & '" & txtPremAmt.Text & "'," _
& "WHERE contno = " & txtContNo.Text & ""
cmdSave = New OleDbCommand(sqlQrySave, connSave)
cmdSave.ExecuteNonQuery()
End Sub
In Premiums Form I have an UNDO button to revert the changes in the table, in case of erroneous updates. The customer might pay higher than what is dealt, so in the "premamt" column where there were original values saved before clicking this SAVE button, I should be able the return the original values, and discard the recently saved. Is there an easy way to do this?
Thank you in advance for the help! :-D