i have a form that has a add record, delete record and a close button.
When the form is opened it is on the first record, the user can navigate to the record that needs to be deleted using the built in navigation buttons. Once they find the record to be deleted they should be able to hit the delete button and the record is deleted.
here is my code: (this was created using the wizzard, which I have used in many other applications)
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_cmdDelete_Click:
Exit Sub
Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click
End Sub
When the form is opened it is on the first record, the user can navigate to the record that needs to be deleted using the built in navigation buttons. Once they find the record to be deleted they should be able to hit the delete button and the record is deleted.
here is my code: (this was created using the wizzard, which I have used in many other applications)
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_cmdDelete_Click:
Exit Sub
Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click
End Sub