R
Rich Stone
I have a database with standard record function buttons. However, my 'Delete'
button seems to have a problem. When I add vb code to bring up a custom
dialgog asking the user whether they definitely wish to delete the current
record, nothing happens after it. However, when I remove the dialog box code,
the record deletes immediately the button is pressed.
My code is as follows:
x = MsgBox("Are you sure you wish to delete the current record?",
vbYesNo + vbExclamation)
If x = vbNo Then
Exit Sub
Else
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End If
Any ideas
button seems to have a problem. When I add vb code to bring up a custom
dialgog asking the user whether they definitely wish to delete the current
record, nothing happens after it. However, when I remove the dialog box code,
the record deletes immediately the button is pressed.
My code is as follows:
x = MsgBox("Are you sure you wish to delete the current record?",
vbYesNo + vbExclamation)
If x = vbNo Then
Exit Sub
Else
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End If
Any ideas