Onload event doesnt run all the time

DixieThunder24

New member
Local time
Today, 07:30
Joined
Mar 15, 2010
Messages
9
I have a form with an onload event that apparently only runs when it wants to. I've checked the onload property on the form and it is set to event procedure. Went through the code on the event and everything looks good. When i mark it in break mode and step through it it runs fine. When I take the marks off it sometimes works and sometimes doesn't. Never seen it do this before and its driving me nuts. Anyone have any ideas?
 
Yes, don't use it. Write your own function within the form and call that when you open your form.
 
do you have subform and setting values to it in the OnLoad event of the main form.
 
..When I take the marks off it sometimes works and sometimes doesn't...
How do you determine if the form's on load event is trigged or not?
Show the code you've in the event!
 
What causes you to give this advice? :confused:
Hours of frustration with the various form events not behaving as I would expect them to! The OP hasn't provided the code in question, so I am only able to guess, but it's usually when setting subform property's, or passing variables to custom property's.

In any event, it's a good way to bug trace, as by calling the function yourself, your code is separate from the events and you are in total control.
 

Users who are viewing this thread

Back
Top Bottom