Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: MsgBox replacement - procedure flow

Geek News

MsgBox replacement - procedure flow
"Jim Franklin" <byebyespam[ at ]ntlworld.com> 12/9/2008 7:22:52 PM
Hi,

I have an Access 2003 app where I want to replace the standard Msgbox
function with the ability to show a message in a popup form which can be
customised. My question is: how do I suspend execution of the procedure at
the point that the MsgBox form is opened, and then return to that point once
the msgbox form is closed (either by the user clicking a command button
option or via the timer event.)

If anyone can tell me how to do this, or has other suggestions for replacing
the Msgbox function with something more customizable, I would be very
grateful,

Thanks,
Jim


Re: MsgBox replacement - procedure flow
John W. Vinson <jvinson[ at ]STOP_SPAM.WysardOfInfo.com> 12/9/2008 7:48:11 PM
On Tue, 9 Dec 2008 19:22:52 -0000, "Jim Franklin" <byebyespam[ at ]ntlworld.com>
wrote:

[Quoted Text]
>how do I suspend execution of the procedure at
>the point that the MsgBox form is opened, and then return to that point once
>the msgbox form is closed

Open the form in Dialog windowmode:

DoCmd.OpenForm "formname", WindowMode:=acDialog
--

John W. Vinson [MVP]
Re: MsgBox replacement - procedure flow
fredg <fgutkind[ at ]example.invalid> 12/9/2008 7:51:37 PM
On Tue, 9 Dec 2008 19:22:52 -0000, Jim Franklin wrote:

[Quoted Text]
> Hi,
>
> I have an Access 2003 app where I want to replace the standard Msgbox
> function with the ability to show a message in a popup form which can be
> customised. My question is: how do I suspend execution of the procedure at
> the point that the MsgBox form is opened, and then return to that point once
> the msgbox form is closed (either by the user clicking a command button
> option or via the timer event.)
>
> If anyone can tell me how to do this, or has other suggestions for replacing
> the Msgbox function with something more customizable, I would be very
> grateful,
>
> Thanks,
> Jim

You all the form using VBA (in place of calling th3 MsgBox), using

DoCmd.OpenForm "YourFormName", , , , , acDialog

Then continue with what ever code you were using if it were a message
box.

Code execution will be stopped until a command button on the form is
clicked.

If the form is returning a value then continue with code such as:

If forms!!YourFormName!ControlA = whatever then
Do something here
End If
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Re: MsgBox replacement - procedure flow
John W. Vinson <jvinson[ at ]STOP_SPAM.WysardOfInfo.com> 12/9/2008 8:50:55 PM
On Tue, 9 Dec 2008 11:51:37 -0800, fredg <fgutkind[ at ]example.invalid> wrote:

[Quoted Text]
>You all the form using VBA (in place of calling th3 MsgBox), using
>
>DoCmd.OpenForm "YourFormName", , , , , acDialog
>
>Then continue with what ever code you were using if it were a message
>box.
>
>Code execution will be stopped until a command button on the form is
>clicked.

Fred, doesn't that depend on the button? IIRC it suspends code until the form
is either closed or made invisible.
--

John W. Vinson [MVP]

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net