Scrolling through data on a subform while the labels are stationar



I'd like to replicate the way the Northwind sample database list products on
a sub form (Product List) on the Categories form. In the Northwind sample, a
user can select one of the categories (beverages, condiments, etc.), and the
Product List subform displays data on the products that match the category
name. Using the subform's scroll bar (either moving the thumb, clicking on
the scroll bar, or using the arrows) results in the data for the next set of
two records being displayed.

My subform has the scroll bar, but when I click on the arrows, I get half of
the prior and half of the next set of data. In the Northwind sample, there
is not change in the position of the labels or data, just the data changes.
I thought how the subform interacts with the scroll bar might have something
to do with the height of the subform (the height of the Products List subform
is 1.3535", a rather exact size), but playing with different form heights for
my form hasn't seem to help.

Two, hopefully slight differences that I want in my form, compared to
Northwind, is I want to display one record at a time, not two, and I need to
be able to edit the data (which I've got setup now).


Arvin Meyer [MVP]

Your eye may be deceiving you. The Northwind sample is a continuous subform,
linked to the categories main form. It is sized to fit exactly 2 records,
but could just as easily be sized for greater or fewer. Clicking on a scroll
bar arrow moves only 1 record, not 2. Likewise using the mouse wheel moves
the subform 1 record at a time. If you click on the scroll bar outside of
the arrows, it will move the form by 1 set of values.


Apparently the key is to figure out the "exact" height height that fits the
required number of records. It took a number of trys of changing the subform
height, but eventually I got it to work.


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