MsgBox replacement - procedure flow

J

Jim Franklin

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
 
J

John W. Vinson

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
 
F

fredg

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
 
J

John W. Vinson

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.
 

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