form not yet initialized during "current" event?

J

jeff1970

Hi,

I'm looking for a way to automatically run a procedure whenever
the form is opened, but AFTER all maintenance operations are completed
(i.e., after the form is fully displayed, ready for user input, etc, etc.).

The obvious solution, to use "on current" event, didn't work. If I run my
procedure inside Form_Current(), I find that the procedure runs before the
form is even displayed on the screen! By the way, the form is not bound to
any table, if it makes any difference.

I know the sequence of events is Open->Load->Resize->Activate->Current, so
it appears there's no events after "Current".

I would hate to use a timer or anything like that, since this is so silly
and error-prone.

Isn't there some way to force a procedure to run after the form is fully
initialized?

Thank you so much,

Jeff
 
R

Rick Brandt

jeff1970 said:
Hi,

I'm looking for a way to automatically run a procedure whenever
the form is opened, but AFTER all maintenance operations are completed
(i.e., after the form is fully displayed, ready for user input, etc,
etc.).

The obvious solution, to use "on current" event, didn't work. If I
run my procedure inside Form_Current(), I find that the procedure
runs before the form is even displayed on the screen! By the way, the
form is not bound to any table, if it makes any difference.

I know the sequence of events is
Open->Load->Resize->Activate->Current, so it appears there's no
events after "Current".

I would hate to use a timer or anything like that, since this is so
silly and error-prone.

Isn't there some way to force a procedure to run after the form is
fully initialized?

Thank you so much,

The form IS fully intialized by the Current in every way that usually matters.
What it might not be is visible on the screen yet. Try adding...

Me.Visible = True

....in one of the earlier events.
 
J

jeff1970

Thanks Rick, everything works now!

Rick Brandt said:
The form IS fully intialized by the Current in every way that usually matters.
What it might not be is visible on the screen yet. Try adding...

Me.Visible = True

....in one of the earlier events.
 

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