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 2007

Tip: Looking for answers? Try searching our database.

OnEnter, go to the same field in the next record of a continuous f

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Julie - 11 May 2007 17:00 GMT
I have a form designed for data entry. It has to be a continuous form for
many reasons.

My user wants to be able to fill up the data of all the first field, then
the second, etc...

Is there a way in the code, probably in the OnEnter procedure of the field,
to make the cursor move to the same field of the next record ?

Thanks for your help !
missinglinq - 12 May 2007 02:58 GMT
There's two ways to do this.

1) Goto Tools > Options > Keyboard  and Uunder "Move After Enter" select
"Next Record"

or

2) For each control (what you call field) you want to exhibit this behaviour
use this code:

Private Sub YourControlName _KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then
   DoCmd.GoToRecord , , acNext
 End If
End Sub

The first method will make this behavior the default for all controls (fields)
on ALL FORMS! This may or may not be problematic for you.

The second method will only affect the controls (Fields) that you use the
code for, but you will need to repeat the code for each control.

BTW, in Access *fields* are found in tables, while *controls* are found on
forms, and hold the values of fields!

Good Luck!

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

 
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.