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

Trace which Key button was pressed?

P: n/a
Hi there,

I have one subform in a Master form, which is set to add mode only.
I allow only for data entry. Sofar all words fine.
All information on the main form is set for display only and have no tab
stops, and all controls are looked.

1) I like to know what event is triggered, when the user presses the <esc
button>, because the subform doesn't remain in addmode, it shows the first
record and subsequent records?
2) I use an unbound textbox which for date entry, which is not affected ,
hence keeps the value entered.
The user how ever is believed that he / she has entered the date already
as they see it?
Question:
When using the <esc button> is the whole form affected or only then entry
sub form?
How could I catch the <esc button> click and then run some code to refresh
the addmode status.

Kind regards

Norman

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hitting the Escape key should not kick the form out of DataEntry mode.
Something else is going on. Not enough info to determine what.

Hitting the Escape key while entering any data will re-set the control
value to it's previous state. If there wasn't any data to begin with
when the user hit Escape it will return to that state (nothing) after
the user hits the Escape. If the user hits Escape more than once any
updates/adds to the current record will be re-set to the record's
previous state.

Use the current control's KeyPress event to read which key was
pressed.

Escape key KeyAscii value = 27

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQCXlk4echKqOuFEgEQLRHgCg6hBvgowLr3sOo6CoFuj3YO RZrdUAn0Pt
/2Jksw4vLVbvEI/1sFTbEyOz
=8Fxs
-----END PGP SIGNATURE-----
Norman Fritag wrote:
Hi there,

I have one subform in a Master form, which is set to add mode only.
I allow only for data entry. Sofar all words fine.
All information on the main form is set for display only and have no tab
stops, and all controls are looked.

1) I like to know what event is triggered, when the user presses the <esc
button>, because the subform doesn't remain in addmode, it shows the first
record and subsequent records?
2) I use an unbound textbox which for date entry, which is not affected ,
hence keeps the value entered.
The user how ever is believed that he / she has entered the date already
as they see it?
Question:
When using the <esc button> is the whole form affected or only then entry
sub form?
How could I catch the <esc button> click and then run some code to refresh
the addmode status.


Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.