Control Scroll Bars in Access 2007?

WinDancer

Registered User.
Local time
Today, 08:58
Joined
Oct 29, 2004
Messages
290
My workstation was upgraded a few days ago to Acess 2007.

A customer asked me to add a drop-down record selector to one of their forms.

When I added the combo box and sized it to fit the correct area it had both scroll bars.

I cannot find the scroll bar horz/vert/both/neither property. I searched access help and even went to the MS site but could find no reference to it.

I need to understand why this is missing, and how we now add/delete the scroll bars. But more importantly, to me, is where to find this info in the future.

TIA,
Dave
 
It's all a matter of sizing. Scroll bars in a Combo Box are automatic. The Vertical Scroll Bar is determined by the List Rows property. If there are more items within the list than what is indicated within the List Rows property then you will get the Vertical Scroll Bar. This of coarse makes sense.

The Horizontal Scroll Bar works in very much the same fashion except that it only comes into play if the Column Widths property is not set wide enough to handle the list contents.

If the Combo List is multi Column then both the Column Widths property and the List Width property will need to be adjusted so as to eliminate the Horizontal Scroll Bar. The Column Widths property so as to ensure each list column can be properly viewed when the list is dropped and the List Width property to ensure that each column can be clearly viewed. By default, the List Width property is set to Auto, this can be changed to whatever measurement you like.

You always want to also make sure that the width of the Combo Box will exceed beyond the longest text that may possibly reside within the drop down list. This of course is not necessary if you set the List Width property wide enough to handle that situation. The drop down list can be wider than the Combo Box.

.
 
I finally gave up last night and went to a work station that is still 2003. The change took under a minute and it works correctly on both versions of Access [2003, 2007].

So I think what you are saying is that there is no longer a property of setting the scroll bars, that they are just there or not depending on the size of the control?

Thanks for the info and the link [which does not cover scroll bars]. It will probably get used a lot the next couple of months- added it to my favorites.

Thanks,
Dave
 
I finally found how to control the scrollbars in 2007 and override the default decision made by 2007-

Me.Scrollbars = 0
0 = None
1 = Horizontal
2 = Vertical
3 = Both
 
A customer asked me to add a drop-down record selector to one of their forms.

When I added the combo box and sized it to fit the correct area it had both scroll bars.

I'm somewhat confused here. In your initial post you indicated that you were having problems with Scroll Bars in a Combo Box yet, the code you supplied in your last post which seems to resolve your problem, turns off the Scroll Bars for the Form not a Combo Box.

It's obvious that I completely misunderstood your problem. My apologies.

.
 
The combo box is a subform- with limited space- and the scroll bars were making the data hard to read.
I also tried this on a single field and it had no effect.
Dave
 
I finally found how to control the scrollbars in 2007 and override the default decision made by 2007-

Me.Scrollbars = 0
0 = None
1 = Horizontal
2 = Vertical
3 = Both

I am only an office Access user, for the most part, so I've only ever used the menus in access. Is the above entry for a command line ala the old Foxpro, DB2 etc? If so, where is this command line in Access?
 
I am only an office Access user, for the most part, so I've only ever used the menus in access. Is the above entry for a command line ala the old Foxpro, DB2 etc? If so, where is this command line in Access?

No, that is VBA code which would go in the form's On Open event.
 
Okay, so it's just a slightly different way than going to the form property and setting it there? Do you by chance know why certain settings won't stay put? (such as scroll bars?). Setting the scroll bars by using the Design/Form/Property works fine...until I close the db and come back later. Or, is that what the code is for? If so, how do you get there again? Under which menu (etc) is Form's On Open located?

Sorry, I guess I've been doing things the roundabout or backward way. I've always just used the menu items for design and such, I've never used VBA code, (that I know of :) )
 
Try this. Perhaps you're having the same issue I had. If all your controls are in the Header section on the form, move all but the header to the Details section (be careful not to move too far to Footer section). The controls work the same whether in Header or Details, but the scrolling only apparently applies to the Detail section. Boom.
 

Users who are viewing this thread

Back
Top Bottom