Delete record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I use the 'Delete record' command the system message appears 'You are
about to delete one record etc, etc'.
In one particular instance I do not want this message to appear.

How can I turn off this message in this one instance.
 
Hi Glynn,
On the form delete event

'you switch off the system messages
DoCmd.SetWarnings False
'You can add a personalised message. In this case I give the possibility to
abort the delete process
If MsgBox("Are you sure you want to delete the record?", vbYesNo,
"Application title") = vbNo Then
Cancel = True
End If

On the after del confirm you switch on again the system messages

DoCmd.SetWarnings True

HTH Paolo
 
Back
Top