execute code after form load (1 Viewer)

AccessKurzo

Dazed and Confused
Local time
Yesterday, 22:56
Joined
Jan 5, 2001
Messages
55
I have a bound form and I need to grab values of a couple controls on the form load event- unfortunately, the form hasn't fully 'loaded' when I try to call the code and get errors. I have tried the code in the form_open, form_activate, form_gotFocus - none of them will work.

How can I open a form and when it has fully opened, execute some code?
 

AccessKurzo

Dazed and Confused
Local time
Yesterday, 22:56
Joined
Jan 5, 2001
Messages
55
nope.

It calls On Current before the form fully loads.

Maybe I can use a timer
 

ghudson

Registered User.
Local time
Yesterday, 23:56
Joined
Jun 8, 2002
Messages
6,194
Straight from the Access help file...

When you first open a form, the following events occur in this order:

Open > Load > Resize > Activate > Current

If you're trying to decide whether to use the Open or Load event for your macro or event procedure, 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. Similarly, the Unload event can be canceled, but the Close event can't.

HTH
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 23:56
Joined
Feb 19, 2002
Messages
43,768
What are you trying to get this data for and what record do you think you are accessing?
 

Users who are viewing this thread

Top Bottom