I have a list box where filtered data is showed. The user highlights the record and clicks on delete button to delete the record. This at the minute completely takes off that record. How do i back-up this data so that on clicking delete button it will remove the record from list box but append to other table called tblBackup?
I have tried making append query which i tried to put the code in vba, but with no success.
code currently on delete button is as follows:
Expand|Select|Wrap|Line Numbers
- Private Sub cmdDelete_Click()
- Dim strSQL As String
- If MsgBox("Are you sure you want to delete selected record?", vbYesNo, "Confirm") = vbYes Then
- strSQL = "DELETE FROM EmployeeTbl WHERE ID = " & Me.ResultList
- CurrentDb.Execute strSQL
- End If
- End Sub