Msgbox

F

Floyd Forbes

I'm trying to setup a msgbox for a append query and a delete query behind a
command button.
How do I set up my Msgbox to cancel out if i select cancel.. If I select
OK, I want it to resume, which it does automatically, but if I select cancel
I want it to cancel the operation....

Floyd
 
R

Rick Brandt

Floyd Forbes said:
I'm trying to setup a msgbox for a append query and a delete query behind a
command button.
How do I set up my Msgbox to cancel out if i select cancel.. If I select
OK, I want it to resume, which it does automatically, but if I select cancel
I want it to cancel the operation....

If MsgBox("Are you sure?",vbOkCancel) = vbOk Then
'Do some stuff
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