Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enter key like Tab 1

Status
Not open for further replies.

DougHomeOffice

Programmer
Oct 31, 2001
37
0
0
US
Is it possible to have the enter key act like the tab key that moves the cursor from field to field. I know it would conflict with button defaults.
 
Hi DougHomeOffice,

I have a line in one of my Access modules like this:

Function Database_Options()
Application.SetOption "Move After Enter", 1
' where 0 stays put and 1 moves after enter
End Function

If you run this function from an Autoexec macro, it will set the default enter key behaviour for the whole database each time it opens.

Some other related options you can set in code are:
Application.SetOption "Arrow Key Behavior", 1
Application.SetOption "Behavior Entering Field", 1
Application.SetOption "Cursor Stops at First/Last Field", 1

The last one here is especially useful in stopping the last enter press on the last field from advancing to the next record (makes it stay on same record but go back to first field). Hope this is what you wanted, Cheers jobo123


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top