FormOpen vs FormLoad

  • Thread starter Thread starter Amit
  • Start date Start date
A

Amit

Hi,

I'm opening "formA" through a button in "formB", and
passing a value to it using OpenArgs.

I'm curious as to where should the OpenArgs be checked
in "formA" and assigned to a control - in OpenForm or
LoadForm? Will it make a difference? How?

Thanks!

-Amit
 
Amit said:
I'm opening "formA" through a button in "formB", and
passing a value to it using OpenArgs.

I'm curious as to where should the OpenArgs be checked
in "formA" and assigned to a control - in OpenForm or
LoadForm? Will it make a difference? How?


FormA can retrieve it's OpenArgs property value at any
point, so you can use it just about anywhere you want. If
you're doing something really tricky with OpenArgs, it might
be a good idea to process it in the Open event and set some
module level variables for later use.

If you want to assign a value to a control on the form, you
should wait until the Load event (the Open event is too soon
to do this). However, you can set many other control
properties (e.g. Visible) in the Open event.
 
Thanks Marsh. Your reply was helpful.

-Amit
-----Original Message-----



FormA can retrieve it's OpenArgs property value at any
point, so you can use it just about anywhere you want. If
you're doing something really tricky with OpenArgs, it might
be a good idea to process it in the Open event and set some
module level variables for later use.

If you want to assign a value to a control on the form, you
should wait until the Load event (the Open event is too soon
to do this). However, you can set many other control
properties (e.g. Visible) in the Open event.
 
Back
Top