M
Maxine G
I have two forms, a menu and a data entry form. The entry form is bound
to a query against linked SQL server tables. In the deactivate event, I
have some code which asks the user if they want to save their changes and
they can respond with yes, no or cancel. If they press cancel, the entry
form stays active with the changes still entered.
So, if I'm on the entry form and have entered data, and then click on the
menu, the deactivate event fires and I get the correct prompt. If I press
cancel, I stay on the entry form. But if I click AGAIN on the menu form,
I've confirmed that the deactivate event doesn't fire so the menu form
becomes active without prompting the user. If I then click back to the
entry form and do it all over, the deactivate event DOES run and the
prompt is issued. So, the deactivate event is firing every OTHER time I
click on the menu form.
I notice that on the times that the deactivate event DOES fire, and I
select cancel and return to the entry screen, the activate event for the
entry screen fires, and then the activate event for the menu screen fires
after that even though the entry screen is the one which will have focus.
I suspect this is related.
Thanks in advance for any help on this question.
-Maxine
to a query against linked SQL server tables. In the deactivate event, I
have some code which asks the user if they want to save their changes and
they can respond with yes, no or cancel. If they press cancel, the entry
form stays active with the changes still entered.
So, if I'm on the entry form and have entered data, and then click on the
menu, the deactivate event fires and I get the correct prompt. If I press
cancel, I stay on the entry form. But if I click AGAIN on the menu form,
I've confirmed that the deactivate event doesn't fire so the menu form
becomes active without prompting the user. If I then click back to the
entry form and do it all over, the deactivate event DOES run and the
prompt is issued. So, the deactivate event is firing every OTHER time I
click on the menu form.
I notice that on the times that the deactivate event DOES fire, and I
select cancel and return to the entry screen, the activate event for the
entry screen fires, and then the activate event for the menu screen fires
after that even though the entry screen is the one which will have focus.
I suspect this is related.
Thanks in advance for any help on this question.
-Maxine