Conditional Message Box

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

Guest

I'm sure this is an easy question - any help would be greatly appreciated. I
have a form with a checkbox. The form is a datasheet and each record has a
checkbox. When the user clicks the checkbox, the record is deleted. What I
want to do is add a messagebox that asks the user if they are sure they want
to delete the record. The delete would not take place if the user clicked
"no". Can someone tell me how to write this to make this work. Any help
would be appreciated.
 
Don,

In its simplest form...

If MsgBox("Really delete?",vbYesNo,"Confirm") = vbYes Then
<your code to delete record>
End If
 
Back
Top