Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hiding scroll bar in combo box

981 views
Skip to first unread message

Peter Hallett

unread,
Jul 15, 2009, 3:00:01 PM7/15/09
to
When a parameter is selected from a combo box, it is often subsequently
employed to determine associated values. A selected surname, for example,
may be used to find an associated ID and/or invoice number.

As a simpler, and presumably more efficient, alternative to using a series
of DLookups, the combo box can be bound not just to the name field of a table
or query, but to the other required fields as well. Having selected the
surname, the associated values can then be read directly as Name.Column(1),
Name.Column(2), etc., where the surname itself is in the default column,
Name.Column(0), or simply Name.

This works quite well if the columns are made wider than the width of the
combo box, thus effectively hiding the additional fields. One snag, however,
is that a horizontal scroll bar is automatically added to the bottom of the
drop-down list which, in such applications, is generally superfluous and can
be distracting. Unlike in form design, there does not appear to be an
obvious mechanism for hiding this feature. Can it be done?

Clifford Bass

unread,
Jul 15, 2009, 3:23:02 PM7/15/09
to
Hi Peter,

Instead of making the columns wider than the list, just set the widths
of those you want to hide to 0.

Clifford Bass

golfinray

unread,
Jul 15, 2009, 3:26:01 PM7/15/09
to
If you right click on the box and get properties, there should be a setting
for scroll bars. You can select vertical, horizontal, both or neither.
--
Milton Purdy
ACCESS
State of Arkansas

Peter Hallett

unread,
Jul 15, 2009, 6:40:02 PM7/15/09
to
Thanks, Clifford. The solution sounds a good one but I can only see an
option to change column widths globally. The first column, showing the name,
has of course to retain the width of the combo box and I can't at present see
how the others can be differentially set to zero width. Have I missed
something?

Peter Hallett

unread,
Jul 15, 2009, 6:41:01 PM7/15/09
to
Such settings are certainly available for forms but I don't see anything
similar for combo boxes.

Clifford Bass

unread,
Jul 15, 2009, 6:46:01 PM7/15/09
to
Hi Peter,

In the Column Widths property enter the width of each column, separated
by a semicolon. So if you have three columns and only want the first column
to show and be 2.5" wide you would enter:

2.5;0;0

If you system uses inches it will adjust to show as:

2.5";0";0"

Peter Hallett

unread,
Jul 16, 2009, 4:00:01 AM7/16/09
to
Thank you once again, Clifford. That is, of course, a very neat and
appropriate solution. I will apply it right away.

Clifford Bass

unread,
Jul 16, 2009, 11:56:16 AM7/16/09
to
Hi Peter,

Glad to help; and you are welcome.

0 new messages