I have a delete button on a form 9developed with the wizard) to delete a record. I have put in a message with the code showing like this
Private Sub Command74_Click()
On Error GoTo Err_Command74_Click
If MsgBox("Delete record?", vbYesNo, "Delete") = vbNo Then
Else
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End If
Exit_Command74_Click:
Exit Sub
Err_Command74_Click:
MsgBox Err.Description
Resume Exit_Command74_Click
End Sub
1. The standard Access message are still showing up
2. The record only shows as deleted after closing / opening the form
Private Sub Command74_Click()
On Error GoTo Err_Command74_Click
If MsgBox("Delete record?", vbYesNo, "Delete") = vbNo Then
Else
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End If
Exit_Command74_Click:
Exit Sub
Err_Command74_Click:
MsgBox Err.Description
Resume Exit_Command74_Click
End Sub
1. The standard Access message are still showing up
2. The record only shows as deleted after closing / opening the form