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

The Return Key

P: n/a
I need a way to disable the Return/Enter key in specific fields or on
a given form.

The goal is to limit way the user exits field as there is necessary
code run when the user exits the field and the Exit Event doesn't seem
to recognize exiting via the Return/Enter key but does for the Tab or
Arrow keys. So I want to limit the user to using the tab or arrow
keys to manuver between fields.

I have tried adjusting the Tools/Options/Keyboard from "Next Record"
to "Next Field" but it doesn't seem to work in a form, just
datasheets. I have also adjusted the "Enter Key Behavior" property in
the properties for the relative fields but that only hides the data by
creating a new line (thus confusing the user as to if they actually
put data in a one line textbox).

So I am assuming that I need to either find a way to disable the
Return/Enter Key or find a way for the Exit event to recognize a
Return/Enter keystroke.

Any help would be appreciated.

von
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
The following will disable the Return key:

In the Keydown event of the form:

Select Case KeyCode
Case 13
KeyCode = 0
End Select

Patrick

On 15 Oct 2004 10:16:48 -0700, re****@MailAndNews.com (Von Bailey)
wrote:
I need a way to disable the Return/Enter key in specific fields or on
a given form.

The goal is to limit way the user exits field as there is necessary
code run when the user exits the field and the Exit Event doesn't seem
to recognize exiting via the Return/Enter key but does for the Tab or
Arrow keys. So I want to limit the user to using the tab or arrow
keys to manuver between fields.

I have tried adjusting the Tools/Options/Keyboard from "Next Record"
to "Next Field" but it doesn't seem to work in a form, just
datasheets. I have also adjusted the "Enter Key Behavior" property in
the properties for the relative fields but that only hides the data by
creating a new line (thus confusing the user as to if they actually
put data in a one line textbox).

So I am assuming that I need to either find a way to disable the
Return/Enter Key or find a way for the Exit event to recognize a
Return/Enter keystroke.

Any help would be appreciated.

von


Nov 13 '05 #2

P: n/a
Patrick Fisher <in**@psoftuk.com> wrote in message news:<dl********************************@4ax.com>. ..

Thanks...
von
The following will disable the Return key:

In the Keydown event of the form:

Select Case KeyCode
Case 13
KeyCode = 0
End Select

Patrick

On 15 Oct 2004 10:16:48 -0700, re****@MailAndNews.com (Von Bailey)
wrote:
I need a way to disable the Return/Enter key in specific fields or on
a given form.

The goal is to limit way the user exits field as there is necessary
code run when the user exits the field and the Exit Event doesn't seem
to recognize exiting via the Return/Enter key but does for the Tab or
Arrow keys. So I want to limit the user to using the tab or arrow
keys to manuver between fields.

I have tried adjusting the Tools/Options/Keyboard from "Next Record"
to "Next Field" but it doesn't seem to work in a form, just
datasheets. I have also adjusted the "Enter Key Behavior" property in
the properties for the relative fields but that only hides the data by
creating a new line (thus confusing the user as to if they actually
put data in a one line textbox).

So I am assuming that I need to either find a way to disable the
Return/Enter Key or find a way for the Exit event to recognize a
Return/Enter keystroke.

Any help would be appreciated.

von

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.