Hi everyone,
I need to delete a record by the command button. I used the wizrd to make the command button, but it deletes the record sometimes and sometimes it doesnt. Can anyone tell me what do i do to delete a record?
here is the code prosuced byt the wizrd:
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
thanks for you help !
dB
I need to delete a record by the command button. I used the wizrd to make the command button, but it deletes the record sometimes and sometimes it doesnt. Can anyone tell me what do i do to delete a record?
here is the code prosuced byt the wizrd:
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
thanks for you help !
dB