Solved

Arrow down from One line to the next on continuous form

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

Suggested Solutions

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

770 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