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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scroll bar in combo box

Status
Not open for further replies.

vix666

IS-IT--Management
Jul 17, 2003
63
AU
I have a combo box which has two columns, the second of which holds an integer value to replace what the user selects from column one, as the user would not understand the relevance of the integer value.
I have set this up and as there are two columns it puts a scroll bar along the bottom so that you can see column 2.

Does anyone know how I can get rid of the scroll bar? as this has been annoying me since lunchtime and i think it should be an easy thing to do - hence why it is annoying me so much. So any help would be great thanks
 
goto the combo box and on column count put 1, this will just hide the column with the intergers
 
When i put the column count to 1, this then will only display column one but when the user selects an item it then isnt displayed in the combo box and doesnt get entered into my table - any other ideas?
 
There are a few things that can help you out:

1. BoundColumn, if set to 2, will store your integer value in the table, *BUT* will display the value in Column 1. I think this is what you want.

2. ListWidth can be set to a larger value than the width of the combobox itself, so you can have huge drop-down lists (one of mine is 5 inches wide) on regular-sized comboboxes. This will eliminate the scrollbar, naturally.
 
The bound column is already set to 2, but it still shows the scroll bar so that you can view column 2.

As for setting a larger value than the width of the combo box, this still shows the values in column 2.

Such a simple thing and such a problem to solve, any other ideas anyone?
 
if u have two bound columns and u set the column count to one both values are present however, if u are updateing ur table using the vba code u have tell it what column u want it to select... i,e. the second one!
 
Column Count 2
Column Widths 2cm;0cm
List Width 2cm

Change 2cm to the width that suits you.
Change 0cm to the width that suits you.
= 2cm + 0 cm Change to Total of Blue and Green above.

Bill
 
Thanks, that has been annoying me for ages - how silly do i look now lol
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top