Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

optional scrollbar? 1

Status
Not open for further replies.

Ashank4vba

Programmer
Apr 29, 2005
115
IN
Hi,

I have a form with a subform where I am populating the sub form based on the button clicked in the parent form.

I have set the Scroll bars setting of the subform to 'Verticals Only'. Accordingly, everytime I open the parent form (which contains the subform) I see the vertical scrollbar in the subform, irrespective of the number of records/lines in the subform. This looks a bit odd to me.

Is there anyway to make the scrollbar appear only when the number of records in the subform exceed the 'page size'?
Thanks a lot!

-cheers
Ashank
 
Hi, Ashank,

You could just manually count the number of rows that are viewable within the subform control, then in the form's OnCurrent event check the RecordCount property of the subform's recordset (or recordsetclone) and set the subform's scrollbars property accordingly.

Ken S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top