B
Bob Hairgrove
Using Access 97 SP-2, German edition:
I'm having some problems here ... believe it or not, the Open event
doesn't seem to fire for one of my forms until the Load event has run.
In the form's Open event, I check the OpenArgs which is set by another
form using the DoCmd.OpenForm method. Depending on the value of this
data, I set the form's Recordsource property in code. Also, I set some
module-scope variables using the OpenArgs as a key to look up some
other values in different tables.
Depending on the values I looked up in the form's Open event, I need
to set up some controls which I have to do in the Load event. However,
the value of those module-scoped variables (type Long) has
mysteriously disappeared (i.e. all become 0)!
I put MsgBox's in both the Load event, right before I read the
variables, and in the Open event, right after I set them. Lo and
behold, I see the message box from the Load event BEFORE the message
box from the Open event.
Has anyone else seen this strange behavior, and if so, what can I do
to ensure that the events fire in the proper order?
Thanks.
I'm having some problems here ... believe it or not, the Open event
doesn't seem to fire for one of my forms until the Load event has run.
In the form's Open event, I check the OpenArgs which is set by another
form using the DoCmd.OpenForm method. Depending on the value of this
data, I set the form's Recordsource property in code. Also, I set some
module-scope variables using the OpenArgs as a key to look up some
other values in different tables.
Depending on the values I looked up in the form's Open event, I need
to set up some controls which I have to do in the Load event. However,
the value of those module-scoped variables (type Long) has
mysteriously disappeared (i.e. all become 0)!
I put MsgBox's in both the Load event, right before I read the
variables, and in the Open event, right after I set them. Lo and
behold, I see the message box from the Load event BEFORE the message
box from the Open event.
Has anyone else seen this strange behavior, and if so, what can I do
to ensure that the events fire in the proper order?
Thanks.