set programmatically: cursor move after <enter>

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When entering data in forms, after pressing <enter> key, one can choose preferred cursor behaviour:
a) doesn't move (stays in the same textbox)
b) moves to the next field (same record)
c) moves to the next record.

This can be set by going to:
Options -> Keyboard -> Move after enter.

Q:
Can this be done programmatically? On one of my forms within the same database I prefer say, a) whereas on another form b) is preferred. It is quite awkward to have to go to Options each time I am switching from one form to the other.
 
Read the setting:
? Application.GetOption("Behavior Entering Field")

Change the setting:
Application.SetOption("Behavior Entering Field") = 0

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Lolik said:
When entering data in forms, after pressing <enter> key, one can choose preferred cursor behaviour:
a) doesn't move (stays in the same textbox)
b) moves to the next field (same record)
c) moves to the next record.

This can be set by going to:
Options -> Keyboard -> Move after enter.

Q:
Can this be done programmatically? On one of my forms within the same
database I prefer say, a) whereas on another form b) is preferred. It is
quite awkward to have to go to Options each time I am switching from one
form to the other.
 
Hi!
I'm trying to do this myself, but I don't quite understand your answer. I
tried putting the code in the form's open event and I got the compile error
argument not optional. Could I get a bit more help?
Thanks!
My database setting is to have the enter key move to the next field, but I'd
like in this one form for it to move to the next record.
 
Clddleopard
You just need to change the syntax to this

Application.SetOption "Move After Enter", 0


Jeanette Cunningham -- Melbourne Victoria Australia
 
Thanks! That did the trick!

Jeanette Cunningham said:
Clddleopard
You just need to change the syntax to this

Application.SetOption "Move After Enter", 0


Jeanette Cunningham -- Melbourne Victoria Australia
 
Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
Back
Top