msgbox

accessman2

Registered User.
Local time
Yesterday, 23:27
Joined
Sep 15, 2005
Messages
335
In MS Access,

MsgBox "Are you sure", vbOKCancel

and there is OK , and Cancel buttons.

I want to do that if click "OK", then run the action, if click "Cancel", then cancel the action.

eg.
MsgBox "Are you sure", vbYesNo
If (vbYesNo = 1) Then
// run the action
End If

So, how do I edit it?

Thanks.
 
Code:
If MsgBox ("Are you sure", vbYesNo) = vbYes then
action
Else
OtherAction
End If
 

Users who are viewing this thread

Back
Top Bottom