message boxes

skate

Registered User.
Local time
Today, 02:36
Joined
May 22, 2002
Messages
136
I have a message box that pops up when my form loads up. For some reason it used to open the form first then show the message box, but now the msgbox pops up first. Is there a way to switch this?
 
As it is currently constructed, what event triggers the message box?
 
it is in the OnLoad event if that helps
 
Are you running a code in the forms OnOpen event?

What code are you running in the forms OnLoad event?

I am guessing that you are running something in the OnLoad event that is tying up the system and the message box appears before the form is visually displayed.

List your OnLoad code (and OnOpen code if any) and maybe we can spot what is preventing the form from displaying before the message box appears.
 
Dim Title, Message
Title = "Creating a Mail List"
Message = "Please select customer records for mail out."
MsgBox Message, vbInformation, Title

This is all I've done. What is the difference b/w using OnLoad and OnOpen? It doesn't effect my messagebox though.
 
.
What is the difference b/w using OnLoad and OnOpen?

one significant difference is that the Open event can be canceled, but the Load event can't. For example, if you're dynamically building a record source for a form in an event procedure for the form's Open event, you can cancel opening the form if there are no records to display
 

Users who are viewing this thread

Back
Top Bottom