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 / May 2008

Tip: Looking for answers? Try searching our database.

Continous Form using Key down

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CD Tom - 02 May 2008 18:34 GMT
is there a way to us the key down event to move to next line on a continous
form.  Right now I have four columns across the form, when the user presses
enter the cursor moves to the next column.  That's fine except I would like
to be able to allow the user to press the down arrow and have the cursor move
down to the next record instead of across the row, is this possible?  Thanks
for any help.
Tom
Rob Parker - 03 May 2008 02:17 GMT
Hi Tom,

Place the following code into the KeyDown event of each of the textboxes in
your continuous form.  It actually does a little more than you asked for -
down arrow moves to next record, up arrow moves to previous record, Home
moves to first record, End moves to Last record.

 On Error Resume Next    'prevents error message if can't move to specified
record
 Select Case KeyCode
   Case 35 'End
     DoCmd.GoToRecord , , acLast
   Case 36 'Home
     DoCmd.GoToRecord , , acFirst
   Case 38 'Up arrow
     DoCmd.GoToRecord , , acPrevious
   Case 40 'Down arrow
     DoCmd.GoToRecord , , acNext
   Case Else
 End Select

HTH,

Rob

> is there a way to us the key down event to move to next line on a
> continous
[quoted text clipped - 8 lines]
> for any help.
> Tom
 
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.