Vertical scroll bar on subform

L

Lori

Hi,

I have a main form with a subform that is a continuous form.
I am having some problems regarding scrolling on the subform. I am
wondering if I have something set up incorrectly on the subform.

The subform on the main form has a height that would allow about 15
records to be viewed without any scrolling. But let's say I only have
2 records on it. It displays my 2 records, then a lot of empty gray
space below it, with a very long scroll bar to the right. (I would
expect no scroll bar, as no scrolling is needed.) If I click on the
down arrow, it will scroll down until I can't see the 2 records, and
the addnew record is the only row being displayed, and it is at the top
of the page.

I can't figure out what is wrong???

It is especially misleading when I actually do an 'addnew'. It puts
the new record in the position I described above - at the top of a
'second' page, and I don't view the prior page of items (which may be
only 3 items, with no reason to have scrolled down). The vertical
scroll bar is so long that I incorrectly think I am viewing all
records, not realizing there is actually a prior 'page' of items.

Incidentally, while the up and down arrows make the position on the
subform move, dragging the scroll bar doesn't do anything. It acts as
if there is nowhere to go.

My guess is that I have set a size or something up incorrectly on my
subform. I have played around with it to test it different ways, but
to no avail.

Any suggestions?

Thanks in advance,
Lori
 
S

Stephen Lebans

The behaviour you describe is the norm for this situation. I don't
personally believe it is the correct UI to present to the user. There is no
way around it short of resizing the Subform programmatically to exactly fit
the current number of rows below a set value(15 in your case).

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
B

BruceM

I'm curious what you would regard as the correct UI. Would it be one where
the size is adjusted programatically? If so, I can imagine that being done
by multiplying the subform RecordCount by some value, and using that as the
height for the subform control. Is there a better approach?
 
L

Lori

I, too, am curious as to what would be the correct UI, and do not feel
that this is a good UI to present to the user. I would be happy to get
around it programmatically. Is there a 'standard' formula to use in
adjusting the height this way, and in what event would that be done?

I am glad to hear that this is 'normal' behavior, though, as I've been
pulling my hair out trying to 'solve' it.

Thanks...Lori
 
S

Stephen Lebans

The correct UI would never allow the user to scroll the records completely
out of view. This is a bug that has been in Access at least since Access 95
when I started developing solutions. The ScrollBar and its early 16 bit
position properties is the root cause of this issue.

I've seen code posted over the years that resizes the form to exactly fit
the current number of rows using the logic you mentioned.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
B

BruceM

Thanks for the reply. I have noticed that behavior, but never gave it a lot
of thought. Now I'll notice it all the time. I'll have to start working
out a way to size the subform.
 

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