own message when delete record from form

  • Thread starter Thread starter Song
  • Start date Start date
S

Song

I used wizard to create a button to delete a record on my form. how to
replace the warning message with my own? I only need yes and not button (no
help button). I'm using Access 2003. Thanks.
 
Song,

Try it something like this...
If MsgBox("Really delete?", vbYesNo, "Confirm") = vbYes Then
With DoCmd
.SetWarnings False
.RunCommand acCmdDeleteRecord
.SetWarnings True
End With
End If
 
Back
Top