Conditional Message Box

D

Don

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.
 
S

Steve Schapel

Don,

In its simplest form...

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top