Replacing warning message before delete

danikuper

Registered User.
Local time
Yesterday, 20:18
Joined
Feb 6, 2003
Messages
147
In my form I have a button to delete the current record. Is there a way of substituting the standard Access warning message "Relationships that specify cascading delete are about to cause 1 record to be deleted..." for a more user friendly one, like "are you sure you want to delete this record?" ?

BTW, I'm using Access 2000.

thanks!
 
Try something like:

Code:
DoCmd.SetWarnings False
If MsgBox("Are you sure?", vbQuestion + vbYesNo, "Delete Record") = vbYes Then
    DoCmd.RunCommand acCmdDeleteRecord
End If
DoCmd.SetWarnings True
 
Awesome!

It works great.

thanks a lot!
 

Users who are viewing this thread

Back
Top Bottom