MsgBox replacement - procedure flow

  • Thread starter Thread starter Jim Franklin
  • Start date Start date
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
 
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
 
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
 
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.
 
Back
Top