The situation is that I have a very long continuous form which I want to
page up and page down looking for stuff but, simply, I don't like using the
scroll bar which is either too slow or too fast for my purposes.
A quick browse of a pageful serves me well with the added attraction that if
I want to compare back I can easily rember that I've paged up or down a
specific number of times.
SendKeys "{PGUP}" is what I have used in the past and is what I'd like to
use again.
As noted elsethread, I'd really suggest avoiding Sendkeys for *anything*. It's
just too buggy, and MS has quit supporting it.
How about figuring out how many lines in a "page" (probably manually) and go
ahead that many lines. This is sort of ugly and inefficient, but I tried it
and it seems to work:
Private Sub cmdPageDown_Click()
On Error GoTo Err_cmdPageDown_Click
Dim nPos As Integer, nMax As Integer
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.Bookmark = Me.Bookmark ' where are we now?
nPos = rs.AbsolutePosition + 5 ' "page" down 5 rows
rs.MoveLast ' be sure the recordset is fully scanned
nMax = rs.RecordCount ' find the last row of the subform
If nPos > nMax Then nPos = nMax
DoCmd.GoToRecord , , acGoTo, nPos ' go down 5 rows
' or to the end of the form, whichever
Exit_cmdPageDown_Click:
Exit Sub
Err_cmdPageDown_Click:
MsgBox Err.Description
Resume Exit_cmdPageDown_Click
End Sub