Solved

Arrow down from One line to the next on continuous form

Posted on 2014-01-22
2
371 Views
Last Modified: 2014-01-23
I have a continuous form in my application that is set up to enter repetative data.

There are five fields across the screen with "Account' being the first.

I have it set up to automatically carry all but the account information from the prior line to each new line that is entered.

The user has requested to be able to go from the account field on one line directly to the account on the next line by pressing the arrow down key.  I know I have done this in the past for other users but I don't remember how.

I know there is a property on the form that must be set but can't remember the details.

How do I provide the users with this ability?
0
Comment
Question by:mlcktmguy
2 Comments
 
LVL 29

Accepted Solution

by:
IrogSinta earned 250 total points
ID: 39801804
Add the following code to a module:
Function KeyUpDown(ByRef vKeycode As Variant) As Boolean
    On Error Resume Next
    If vKeycode = vbKeyDown Then
        DoCmd.GoToRecord , , acNext
    Else If vKeycode = vbKeyUp Then
        DoCmd.GoToRecord , , acPrevious
    End If
End Function

Open in new window

Then add OnKeyUp and OnKeyDown events to each of the fields in your continuous form and put this code in their procedures:
Call KeyUpDown(KeyCode)

Ron
0
 
LVL 1

Author Closing Comment

by:mlcktmguy
ID: 39803312
Excellent
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now