Event Order and Code Placement

  • Thread starter Thread starter Ray
  • Start date Start date
R

Ray

Have a "pop-up" utility form that performs a single task - it enables
the user to ping a specified location.

The form has several labels and 2 buttons cmdPing and cmdClose.

When cmdPing is clicked, it displays a wait indicator, disables
cmdPing, and waits for the results - when they return, it updates a
status indicator, removes the wait indicator, and reenables cmdPing.

All of this works as desired.

So - since this is the only thing this form is used for I decided to
have it perform an initial ping when the form is opened - so I call
cmdPing_Click. The only problem is, I want the form to be fully
loaded and visible BEFORE the cmdPing_Click code is executed.

In an attempt to do so, I am execute he following to lines..

Me.Repaint
Call cmdPing_Click

But the code executes BEFORE the form is visible....
Any suggestions?

So far - I've tried the following (I was thinking this was the event
order)

On Open
On Load
On Activate
On GotFocus
On Current

Oh - sorry - I forgot to mention Access2k (9.0.2720) on WinXP Pro sp2.


Thanks
Ray
 
Ray,

If you want to be sure that the form is fully loaded and displayed complete
before the Ping code runs, try the OnTimer event. Set the timer to a second
or two.
 
Back
Top