Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using the up/down keys to scroll to highlight records. 1

Status
Not open for further replies.

techkenny1

Technical User
Jan 23, 2009
182
AU
Hi,
In a continous form I want to be able to use the up/down keys to highlight a record. Is this possible?
In the options there is an option for the arrow keys but this does not seem to work vertically.
I wanted to use the up/down keys to do just that. Up or down records and to be able to highlight each records as it does.

many thanks

 
To highlight a row:
To use the up and down arrows:
Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
    Case 38
        KeyCode = 0
        If Not Me.Recordset.BOF Then
            Me.Recordset.MovePrevious
        End If
    Case 40
        KeyCode = 0
        If Not Me.Recordset.EOF Then
            Me.Recordset.MoveNext
        End If
End Select
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top