471,066 Members | 1,313 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

Flexibility in scrolling through continuous forms (no scroll bars)?

Is there a way in Access that I could make it so that the end user could
scroll up and down, or right and left, depending on the arrow keys
depressed? In form view, instead of going left to right through each
record, just scroll down a column, or to the right, or to the left, or
whatever?

Thanks.

Rich Hollenbeck
Nov 13 '05 #1
2 2312
In general, the left/right arrows do work just fine, but the up down don't
work (as you mentioned).

I just as a regulate thing nearly *always* paste the following code into my
continues form, and they function just like a spread sheet.

Also, make sure you set the forms keypreview = yes

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

' key hand

Select Case KeyCode

Case vbKeyEscape
KeyCode = 0
DoCmd.Close

Case vbKeyUp
KeyCode = 0
On Error Resume Next
DoCmd.GoToRecord acActiveDataObject, , acPrevious

Case vbKeyDown
KeyCode = 0
On Error Resume Next
DoCmd.GoToRecord acActiveDataObject, , acNext

Case vbKeyReturn
If IsNull(Me.ID) = False Then
KeyCode = 0
Call EditMain
End If

End Select

End Sub

You of course can remove the Esc key, and the Enter key code I have
above....

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
http://www.attcanada.net/~kallal.msn
Nov 13 '05 #2
One option, Tools|Options|Keyboard tab. Set "Move after Enter" to Next
Record. This will cause you to go to the next record when Enter is pressed.
Page Up/Page Down will move you a page of records at a time. Another option
for moving one record at a time when up/down arror are pressed is to set Key
Preview to On for the form and in the form's KeyDown event.

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyDown Then
DoCmd.GoToRecord , , acNext
End If
If KeyCode = vbKeyUp Then
DoCmd.GoToRecord , , acPrevious
End If
End Sub
--
Wayne Morgan
MS Access MVP
"Richard Hollenbeck" <ri****************@verizon.net> wrote in message
news:a1****************@nwrddc01.gnilink.net...
Is there a way in Access that I could make it so that the end user could
scroll up and down, or right and left, depending on the arrow keys
depressed? In form view, instead of going left to right through each
record, just scroll down a column, or to the right, or to the left, or
whatever?

Thanks.

Rich Hollenbeck

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Dino M. Buljubasic | last post: by
7 posts views Thread by Sharon | last post: by
1 post views Thread by David_from_Chicago | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.