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!

Show Horizontal scrollbar on the top of a form

Status
Not open for further replies.

MCSGraham

Programmer
May 28, 2002
52
US
Hello,

Is there any way possible to show a horizontal scrollbar at the top of a form?

I have a subform inside my main form that is set to scroll horizontally but the subform is so tall that the users have to scroll down the main form to be able to use the horizontal scrollbar at the bottom of the subform to go to the next column in it. It would be great to have a horizontal scrollbar at the top of the subform so they could scroll across without having to scroll down the main form first.

thanks a lot in advance for any help
 
one thing i do is to shorten the box size of the subform on the main form so the users can see all the scroll bars.

having said that, i've been digging into this for a while. i tried the Microsoft Forms 2.0 Scroll Bar but i couldnt figure out how to make it look like my subform scroll bar, after that i didnt really know how to make the subform scroll to the same position as the ActiveX one.
so how about this solution:
on the main form, i put two buttons above the subform, next to each other. you can put more if you need it. anyhow in the left hand button i put in it's OnClick event:
Code:
    Me.EmpTasks.SetFocus
    SendKeys "{Home}"
where 'EmpTasks' = your subform name
and in the right-hand button i put
Code:
    Me.EmpTasks.SetFocus    
    SendKeys "{END}"

on the left-hand button caption: &quot;<<&quot; and in the right-hand button caption: &quot;>>&quot;.

i'd looked up in help under 'scrolling' and saw 'Use shortcut keys in Print Preview and Layout Preview' then used what i wanted in SendKeys. what i did goes all the way to the right, then all the way to the left. if you want just to go in increments, put in left arrow and right arrow. check the help for others.

hope this helps.

g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top