M
MikeB
One can press "Esc" twice to undo updates to a record displayed in a
form. Or have a button that calls DoCmd with some parameters (the
button wizard takes care of this). Unfortunately, this doesn't undo
changes to unbound controls (unless I'm missing something).
Aside: I'm not sure if an unbound control is the same as a calculated
control. I think it is, since in an unbound control, I'm responsible
for determining the value displayed in the control.
I can call a sub to calculate the correct value in the unbound control
from the button_click event. To reset the control after double escape,
all I can figure out is that I have to set the form property so the
form gets passed an event notifier for all keypress events and then I
have to write an event handler for the form to look at all (each and
every) keypress on the form. And some convoluted code to make sure
that I'm trapping double "Esc" and nothing else.
Am I understanding this correctly? If so, are the keypress events
still passed through my code after I do stuff, or do I have to call
something special to pass on the keypress and the key that was
actually depressed? I'm particularly concerned with "special" keys
such as Alt, Cntrl, Fn, etc....
Thanks.
form. Or have a button that calls DoCmd with some parameters (the
button wizard takes care of this). Unfortunately, this doesn't undo
changes to unbound controls (unless I'm missing something).
Aside: I'm not sure if an unbound control is the same as a calculated
control. I think it is, since in an unbound control, I'm responsible
for determining the value displayed in the control.
I can call a sub to calculate the correct value in the unbound control
from the button_click event. To reset the control after double escape,
all I can figure out is that I have to set the form property so the
form gets passed an event notifier for all keypress events and then I
have to write an event handler for the form to look at all (each and
every) keypress on the form. And some convoluted code to make sure
that I'm trapping double "Esc" and nothing else.
Am I understanding this correctly? If so, are the keypress events
still passed through my code after I do stuff, or do I have to call
something special to pass on the keypress and the key that was
actually depressed? I'm particularly concerned with "special" keys
such as Alt, Cntrl, Fn, etc....
Thanks.