Solved

Arrow down from One line to the next on continuous form

Posted on 2014-01-22
2
375 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

840 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