mdProgrammer
Programmer
I'm using the following code to delete a record:
The problem is... it isn't deleting it. I'm using a button on a form (without the record navigation controls enabled) to delete the current record.
Code:
Private Sub btnDeleteRecord_Click()
EdtMsg = MsgBox("Are you sure you want to delete this record?", vbYesNo, "Delete Record")
If EdtMsg = vbNo Then
Exit Sub
End If
DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End Sub
The problem is... it isn't deleting it. I'm using a button on a form (without the record navigation controls enabled) to delete the current record.