set programmatically: cursor move after <enter>

L

Lolik

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.
 
A

Allen Browne

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.
 
C

Clddleopard

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.
 
J

Jeanette Cunningham

Clddleopard
You just need to change the syntax to this

Application.SetOption "Move After Enter", 0


Jeanette Cunningham -- Melbourne Victoria Australia
 
C

Clddleopard

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
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top