P
Paul Mars
Several fields have validation. Others are required before record can be
saved. Others will cascade deleted or changed data. If user tries to save,
move to other record, close form using the btnClose, or move to other field;
I have user friendly MsgBoxes that inform the user and sometimes give the
user a choice(YesNoCancel). This also works with the btnClose. That is, if
user tries to close the form before leaving the field, my MsgBox will show,
then whatever button on my MsgBox the user chooses, the close is canceled.
Not canceled by me, it just happens that way and this is good. HOWEVER, if
user clicks the blasted "X" another error message appears after my MsgBox.
This message allows the user to cancel the close, or close without saving.
Either one is ok, except this message confuses the users. How can I not show
this message can cancel the close? (mimic the BtnClose event)
I know that I can set a Global variable as Boolean, but then I must either
set it to false on load, check it on Un_Load, and then check all validated
and required fields on close before setting it to true, or just set it to
false if fail validation / required and set it to true if pass.
Is there an easier way?? I tried setting above variable to false on
Form_Error, but that did not work. Maybe it needs to be a field error, but
that takes me back to individual fields code. Is there a way without adding
event code to all effected fields?
Paul
saved. Others will cascade deleted or changed data. If user tries to save,
move to other record, close form using the btnClose, or move to other field;
I have user friendly MsgBoxes that inform the user and sometimes give the
user a choice(YesNoCancel). This also works with the btnClose. That is, if
user tries to close the form before leaving the field, my MsgBox will show,
then whatever button on my MsgBox the user chooses, the close is canceled.
Not canceled by me, it just happens that way and this is good. HOWEVER, if
user clicks the blasted "X" another error message appears after my MsgBox.
This message allows the user to cancel the close, or close without saving.
Either one is ok, except this message confuses the users. How can I not show
this message can cancel the close? (mimic the BtnClose event)
I know that I can set a Global variable as Boolean, but then I must either
set it to false on load, check it on Un_Load, and then check all validated
and required fields on close before setting it to true, or just set it to
false if fail validation / required and set it to true if pass.
Is there an easier way?? I tried setting above variable to false on
Form_Error, but that did not work. Maybe it needs to be a field error, but
that takes me back to individual fields code. Is there a way without adding
event code to all effected fields?
Paul