Change "Move After Enter" with code?

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

Guest

A search didn't reveal the answer so sorry if it's been answered elsewhere. I
could change the On Enter behavior of all the fields on my form I guess but
I'd really like to change the Tools / Options / Keyboard setting to guarantee
users don't jump to a blank record by hitting the Enter key. What's the best
approach for this? The form is set to Cycle Current Record.
 
Dave said:
A search didn't reveal the answer so sorry if it's been answered
elsewhere. I could change the On Enter behavior of all the fields on
my form I guess but I'd really like to change the Tools / Options /
Keyboard setting to guarantee users don't jump to a blank record by
hitting the Enter key. What's the best approach for this? The form is
set to Cycle Current Record.

If you have the Cycle property set to Current Record then the <Enter> key should
not be causing the record to change.
 
Changing the Move After Enter setting causes my form to jump to a new record
regardless of the Cycle setting.
 
Dave said:
Changing the Move After Enter setting causes my form to jump to a new
record regardless of the Cycle setting.

I just built a test form and when I set Cycle to "Current Record" and press
<Enter> in the last control I just go back to the first control. I do not
move to the next record. Are you sure you don't have some code or a macro
that might be changing the record?
 
Does it do this regardless of the Tools / Options / Keyboard setting? I don't
have any code that would cause this. If I change the Keyboard setting to Next
record it jumps to a new record no matter what field I'm in. Changing the
Keyboard setting to Next field causes the form to act as expected & just
cycle through the fields over & over again. I wasn't even aware of the issue
until another user brought it up because it always worked fine for me. I
emailed everyone to change this setting but I can't guarantee that's every
one's desired behavior all the time.
 
Dave said:
Does it do this regardless of the Tools / Options / Keyboard setting?
I don't have any code that would cause this. If I change the Keyboard
setting to Next record it jumps to a new record no matter what field
I'm in. Changing the Keyboard setting to Next field causes the form
to act as expected & just cycle through the fields over & over again.
I wasn't even aware of the issue until another user brought it up
because it always worked fine for me. I emailed everyone to change
this setting but I can't guarantee that's every one's desired
behavior all the time.

Okay I misunderstood. Yes if the global keyboard option setting is set to
change records on the Enter key then that is what will happen. That is not
the default setting though so I doubt many of your users would have it set
that way.
 
Thanks Rick
I didn't see any reference in the Help to changing this with DoMenuItem or
RunCommand. Do you know of a way to force the Keyboard Option?
 
Application.SetOption("Move After Enter") = value

The choices are Don't Move (0), Next Field (1) or Next Record (2)
 
Just what I was looking for. Thank You!

Douglas J. Steele said:
Application.SetOption("Move After Enter") = value

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

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

Back
Top