Popup Form + Messagebox

S

Steve

Does anyone know of a way to open a messagebox over a popup form opened in
acDialog mode?

Thanks for any ideas!

Steve
 
S

Steve

Ken,

Thanks for replying!

You missed my question!

MsgBox "Whatever"
DoCmd.OpenForm "MyForm",,,,,acDialog

In the above code, the message box has to close before MyForm opens.

DoCmd.OpenForm "MyForm",,,,,acDialog
MsgBox "Whatever"

In this code, MyForm has to either become not visible or close before the
messagebox opens.

I'm looking for a way to have them both open at the same time.

Steve
 
V

Vlad C

Steve,
Depends when do you need them. If you want them to be opened from somewhere else, simply use the timer event of the pop-up and use a switch after the first opening of the message box (hidden text box on the form that would store a boolean showing that the message has been displayed or a variable declared on the Form_Load event). If you do anything on the pop-up first, just use the apropriate event of the control tha has (or loses) the focus.
 
L

Lyle Fairfield

Ken,

Thanks for replying!

You missed my question!

MsgBox "Whatever"
DoCmd.OpenForm "MyForm",,,,,acDialog

In the above code, the message box has to close before MyForm opens.

DoCmd.OpenForm "MyForm",,,,,acDialog
MsgBox "Whatever"

You could try

Private Sub Form_Load()
Me.Visible = True
MsgBox "blah"
End Sub

in the form module.
 
K

Ken Snell

You're right...I didn't understand that this was what you wanted to do.

Open the MsgBox from the Dialog form, not from the calling form. As Lyle
suggests, you can do this in the dialog form's OnLoad event; or you can use
the dialog form's OnOpen event.
 

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