Scrolling on Subforms

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

Does any body know how to change how you scroll
vertically, from starting at the top and going down, to
Starting at the bottom going to the top. Basically I have
a sub form that I want to reverse the scrolling from top
to bottom, to bottom to top.
 
Not exactly... there's no property setting to do what you want, but you can
locate to the last record in the subform with VBA code. In a test app I
have, the following works to move to the last record in the Order Details
Form which is embedded in the Subform sbfOrderDetails.

Dim rs As DAO.Recordset
Set rs = Me!sbfOrderDetails.Form.RecordsetClone
If Not (rs.EOF And rs.BOF) Then
rs.MoveLast
Me!sbfOrderDetails.Form.Bookmark = rs.Bookmark
End If
rs.Close

I put the code in the main Form's OnCurrent event. You'll need to change the
"sbfOrderDetails" to the name of your Subform Control.

Larry Linson
Microsoft Access MVP
 
Back
Top