X
xg
I use the wizard to add a button on my continous form's detail band so each
record will have a button for delete action. The wizard gives me these
codes:
Private Sub cmdDel_Click()
On Error GoTo Err_cmdDel_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_cmdDel_Click:
Exit Sub
Err_cmdDel_Click:
MsgBox Err.Description
Resume Exit_cmdDel_Click
End Sub
The problems are:
1. If user click the button, select NO to cancel, the number of records are
not same. Need to refresh? How?
2. I do not want the 2nd message box show if user select NO to cancel.
3. Any other simple way to delete the record next to my button?
Thanks.
record will have a button for delete action. The wizard gives me these
codes:
Private Sub cmdDel_Click()
On Error GoTo Err_cmdDel_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_cmdDel_Click:
Exit Sub
Err_cmdDel_Click:
MsgBox Err.Description
Resume Exit_cmdDel_Click
End Sub
The problems are:
1. If user click the button, select NO to cancel, the number of records are
not same. Need to refresh? How?
2. I do not want the 2nd message box show if user select NO to cancel.
3. Any other simple way to delete the record next to my button?
Thanks.