I have a subform in an MS Access form which is not hiding/showing the vertical scroll bars as needed. In the example picture, the vertical scroll bar is showing even though there aren't enough records to warrant vertical scrolling. How do I get the scroll bars to show only when they are needed? Do I need to add an if-then condition to the on_load event? or is there an easier option?
Example http://www.freeimagehosting.net/uploads/37834d1d76开发者_如何学JAVA.jpg
You may find something on these lines suits:
If Me.Recordset.RecordCount > 10 Then
Me.ScrollBars = 2 ''Vertical only
Else
Me.Scrollbars = 0 ''Neither
End If
精彩评论