From: Jesse via AccessMonster.com on
I have a message pop up when a command button is pressed to run a report. The
problem is the cancel button is not cancelling the action. It still runs the
report like you pressed ok. What am I missing?

Response = MsgBox("Approximate wait time is 5 minutes." _
& Chr(10) & Chr(13) & _
"Push OK to continue,Cancel to Quit", 1)

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201002/1

From: Linq Adams via AccessMonster.com on
Perhaps you need to go back and look at Access Help for MsgBox!

Your posted code doesn't even include what buttons you want to appear on the
messagebox, much less what you want to do according to the button pushed! All
you're doing is presenting a message!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via http://www.accessmonster.com

From: Jesse via AccessMonster.com on
Ok, All im trying to accomplish is a msg that pops up and states a run time
then as an OK or Cancel button. If the ok is pressed then continue with the
command action or if cancel is pressed then cancel the command action.

Linq Adams wrote:
>Perhaps you need to go back and look at Access Help for MsgBox!
>
>Your posted code doesn't even include what buttons you want to appear on the
>messagebox, much less what you want to do according to the button pushed! All
>you're doing is presenting a message!
>

--
Message posted via http://www.accessmonster.com

From: Douglas J. Steele on
Actually, the posted code DOES include what buttons should appear. The ", 1"
after the text corresponds to vbOkCancel.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Linq Adams via AccessMonster.com" <u28780(a)uwe> wrote in message
news:a408923c31ce3(a)uwe...
> Perhaps you need to go back and look at Access Help for MsgBox!
>
> Your posted code doesn't even include what buttons you want to appear on
> the
> messagebox, much less what you want to do according to the button pushed!
> All
> you're doing is presenting a message!
>
> --
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000/2003
>
> Message posted via http://www.accessmonster.com
>

From: Douglas J. Steele on
Private Sub MyButton_Click()
Dim Response As Long

Response = MsgBox("Approximate wait time is 5 minutes." _
& Chr(13) & Chr(10) & _
"Push OK to continue,Cancel to Quit", vbOkCancel)
If Response = vbOk Then
DoCmd.OpenReport ...
End If

End Sub

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Jesse via AccessMonster.com" <u50870(a)uwe> wrote in message
news:a408b0b3f5930(a)uwe...
> Ok, All im trying to accomplish is a msg that pops up and states a run
> time
> then as an OK or Cancel button. If the ok is pressed then continue with
> the
> command action or if cancel is pressed then cancel the command action.
>
> Linq Adams wrote:
>>Perhaps you need to go back and look at Access Help for MsgBox!
>>
>>Your posted code doesn't even include what buttons you want to appear on
>>the
>>messagebox, much less what you want to do according to the button pushed!
>>All
>>you're doing is presenting a message!
>>
>
> --
> Message posted via http://www.accessmonster.com
>