By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,484 Members | 1,811 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,484 IT Pros & Developers. It's quick & easy.

A97 removing value from textbox after CancelEvent (DMVFileNo_BeforeUpdate frmENF264ProcessingForm)

P: n/a
MLH
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?
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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-----
Nov 13 '05 #2

P: n/a
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-----
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.