Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2008

Tip: Looking for answers? Try searching our database.

set programmatically: cursor move after <enter>

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lolik - 02 Jul 2004 22:56 GMT
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.
Allen Browne - 03 Jul 2004 04:02 GMT
Read the setting:
   ? Application.GetOption("Behavior Entering Field")

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

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> When entering data in forms, after pressing <enter> key, one can choose preferred cursor behaviour:
> a) doesn't move (stays in the same textbox)
[quoted text clipped - 6 lines]
> 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.
Lolik - 03 Jul 2004 17:29 GMT
Allen, spot on! Appreciate it...
Lolik
Clddleopard - 26 May 2008 17:20 GMT
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.

> Read the setting:
>     ? Application.GetOption("Behavior Entering Field")
[quoted text clipped - 16 lines]
> quite awkward to have to go to Options each time I am switching from one
> form to the other.
Jeanette Cunningham - 27 May 2008 01:07 GMT
Clddleopard
You just need to change the syntax to this

Application.SetOption "Move After Enter", 0

Jeanette Cunningham -- Melbourne Victoria Australia

> Hi!
> I'm trying to do this myself, but I don't quite understand your answer. I
[quoted text clipped - 26 lines]
>> quite awkward to have to go to Options each time I am switching from one
>> form to the other.
Clddleopard - 27 May 2008 20:39 GMT
Thanks! That did the trick!

> Clddleopard
> You just need to change the syntax to this
[quoted text clipped - 33 lines]
> >> quite awkward to have to go to Options each time I am switching from one
> >> form to the other.
Jan Baird - 27 May 2008 20:52 GMT
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 - 27 May 2008 20:52 GMT
Jan Baird is out of the country until September 20.   Every effort will be
made to respond to messages, but please be patient.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.