Does Form Resize event ever run before Load even?

  • Thread starter Thread starter Max Moor
  • Start date Start date
M

Max Moor

Hi,

I know what the documentations says, but...

I instanciate a class in a form's Load event code. I have some code I
want to run in the Resize event code that uses that class.

If I put all my code in the Load event handler, everything runs fine.
If I move the "Resize" code to the Resize event handler (which I'm told runs
after the Load event), I get an "Object variable or With block variable not
set" error on the line with the class method call. s It's acting as though
the Resize code is running before the Load event gets the class instanciated.

Does this sound familiar to anyone? Any thoughts?

Thanks for the help,
Max
 
Hi,

I know what the documentations says, but...

I instanciate a class in a form's Load event code. I have some
code I
want to run in the Resize event code that uses that class.

If I put all my code in the Load event handler, everything runs
fine.
If I move the "Resize" code to the Resize event handler (which I'm told
runs after the Load event), I get an "Object variable or With block
variable not set" error on the line with the class method call. s It's
acting as though the Resize code is running before the Load event gets
the class instanciated.

Does this sound familiar to anyone? Any thoughts?

Thanks for the help,
Max

I've answered my own question. Funny how long I've been playing around
in Access, and still don't think about using Debug.Print right away.

It turns out that the FormInfo class module, from the Access
Developer's Handbook, does indeed cause forms' resize events to fire.
Since I had FormInfo calls in a form's Load event, I was getting Resize
events before the Load completed. Easy to negotiate a fix once I saw what
was happening. Live and learn.

- Max
 
Back
Top