MLH wrote:
What's the best technique to remove a value entered
into a form's textbox control after halting the update of
the textbox with a docmd.cancelevent line in a before
update event procedure?
IE, say the user types 3 into the text box and presses
Enter. I prompt him saying "Are you sure? The previous
value was 2. Do you really wanna do this?" Say the
user chooses No - I abort the update of the control with
the cancelevent but the 3 remains in the control. I have
been sending an ESC with sendkeys. Just a single ESC,
that's all. Is that OK?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Use:
Me!ControlName.Undo
for controls on the same form that you are issuing the cancel event
command.
Or, for controls on a different form that were the cancel event command
is issued:
Forms!FormName!ControlName.Undo
Substitute the real form/control name in the proper place.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA+AwUBQvJZw4echKqOuFEgEQJBkgCg/IJnXcNNRvHOCMU+OQV56AxORfYAmL9d
xz+HjbzC24kA7W99IzbXr3A=
=7eI/
-----END PGP SIGNATURE-----