The on open event is good for testing things like no records, and shutting
down the form. The on-open event has a "cancel" option where as the on-load
does not.
Hence, the general purpose of the on-open event is to test that certain
condition are met BEFORE the form actually loads. If you do a cancel in the
on-open, then the form does not load, and the code in the on-load event DOES
NOT run.
I use the on-open to check for record locking and allow the user to "bail
out" if another user is editing the data for example.
Further, values of the fields etc CAN NOT be changed in the on open. So, you
can't use on-open to setup values in controls.
so, we get:
on-open
Allows you to cancel the form load, and it is too soon to modify field
values on the form.
on-load
This is where you can set-up field defaults. Set-up some code variables
and code stuff that you need to run when the form loads. You can modify the
value of fields at this point. So, you basic start-up and setup code should
go in the on-load, since on-open is too soon to modify values.
So, you get a very nice natural division between the on-open code (test and
verify stuff), and the on-load (set-up and initialise stuff).