Disable Enter Key

  • Thread starter Thread starter Julie
  • Start date Start date
J

Julie

I have a data entry form. I want to disable the enter key so that if it is
pressed, the insertion point does not move/go to a new record. I do not want
to set the property using options-keyboard-"move after enter" because I'm in
a multi-user environment and it just won't happen.

I found this code in a previous post:

Application.SetOption("Move After Enter") = value

The choices are Don't Move (0), Next Field (1) or Next Record (2)

This sounds like what I want... using (0) Don't Move. I'm just not
experienced enough to know where to put this code to get it to work. I tried
just putting it into the form I was working on but no luck.
 
I have a data entry form. I want to disable the enter key so that if it is
pressed, the insertion point does not move/go to a new record. I do not want
to set the property using options-keyboard-"move after enter" because I'm in
a multi-user environment and it just won't happen.

I found this code in a previous post:

Application.SetOption("Move After Enter") = value

The choices are Don't Move (0), Next Field (1) or Next Record (2)

This sounds like what I want... using (0) Don't Move. I'm just not
experienced enough to know where to put this code to get it to work. I tried
just putting it into the form I was working on but no luck.

Check out setting the KeyPreview to the true and capturing the event
before anything else kicks in.
 
Back
Top