on a single record form, I have a command button that simply deletes the current record (see code below)
problem is that somewhere in the project, the warning that you are about to delete a record is occassionally (but not always) turned off, and I haven't yet been able to locate the lines that are doing it ...
as a work around, I thought adding the line "DoCmd.SetWarnings True" would restore the warning; this is obviously not correct..
any thougths and suggestions will be greatly apreciated in advance,
Mark
Private Sub cmdDeleteType_Click()
On Error GoTo Err_cmdDeleteType_Click
< ... >
'delete the current record and move to the previous one
DoCmd.SetWarnings True
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
If Me.NewRecord Then
DoCmd.GoToRecord , , acPrevious
End If
< ... >