T
TimC
I want to be able to detect when forms are activated and deactivated.
So I used the Form_Activate and Form_Deactivate events. To test it
worked as expected I placed a Debug.print line in each of the event
procedures of the forms I was experimenting with.
The behaviour I observed seems bizzare to me. When clicking on the
form - Nothing. When clicking away from the form - the deactivate
event for the form AND the deactivate event for the SAME form both
fired.
So when I expected the activate form to fire, nothing happened. When I
expected the deactivate event to fire, both the deactivate and the
activate event fired.
Note that these forms are fairly complex with multiple subforms and a
lot of code behind the form.
I then created a very simple form and added the debug.print statements
to its Activate and Deactivate event procedures. Everything worked as
it should ie Activate event fired when form was clicked, Deactivate
fired when form was clicked away from.
So it would appear that something about these complex forms is
confusing Access. Does anyone have experience with this? I would like
to identify specifically what aspects of my forms are confusing Access
and modify so that I end up with the Form_Activate event firing
reliably.
By the way, the deacativate event seems to be reliable from my testing.
So I used the Form_Activate and Form_Deactivate events. To test it
worked as expected I placed a Debug.print line in each of the event
procedures of the forms I was experimenting with.
The behaviour I observed seems bizzare to me. When clicking on the
form - Nothing. When clicking away from the form - the deactivate
event for the form AND the deactivate event for the SAME form both
fired.
So when I expected the activate form to fire, nothing happened. When I
expected the deactivate event to fire, both the deactivate and the
activate event fired.
Note that these forms are fairly complex with multiple subforms and a
lot of code behind the form.
I then created a very simple form and added the debug.print statements
to its Activate and Deactivate event procedures. Everything worked as
it should ie Activate event fired when form was clicked, Deactivate
fired when form was clicked away from.
So it would appear that something about these complex forms is
confusing Access. Does anyone have experience with this? I would like
to identify specifically what aspects of my forms are confusing Access
and modify so that I end up with the Form_Activate event firing
reliably.
By the way, the deacativate event seems to be reliable from my testing.