Discussion Locked

Multiple rows in a subform (Access 97)

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi!
I have a mainform with a subform.
The subform is linked to a combobox(customerId) on the mainform. The subform is used to display orders from the customer selected in customerID.

How Do I set up the subfom so the defaultview is 5 rows. If customer A has orders 5 empty rows is displayed in the subfom and if customer B has 7 orders 5 is displayed and a scrollbar is added so you could watch the rest.

Sincerly
JAONHA

6 replies

by donq

You don't!

Access will always produce a unique recordset based on a query using "customerid" as a filter. When five rows are produced 5 rows is what you will get. -ALWAYS

With your main form in design view size the sub form so the scroll bar does not appear when 5 records are produced, but adds the scroll bar when 6 or more records are produced. Your links are evidently working fine so the physical size of the subform within the mainform, and/or the fields and rows within the subform are your only available size controls.

by mbarker734

In the form properties of your sub form set the Default View to Continuous Forms. Also set Navigation Buttons to Yes.

Size your subform on your main form to dislplay the five lines you desire, additional space will be required for the Navigation Buttons at the bottom of the subform.

Your in busness.

Mark

by mbarker734

Forgot to mention:

On the subform set Scroll Bars to Vertical Only. If you need it to go left and right set it to Both.

This discussion is closed to new replies.