Scrolling on Subforms

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.
 
L

Larry Linson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top