Link to home
Start Free TrialLog in
Avatar of polkadot
polkadot

asked on

display colums of table in combobox

Combobox display info from vendor table, that contain 4 colums. When the user make a choice from combobox it display only one colum, but i want to display all 4 colums on Form?! (using Access db Form)
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

set the column count of the combo to 4
set the column count property of the combo to 4.
in design view of the form select the combo and hit F4

column count  4

also set the column widths accordingly
If you are talking about displaying the four columns after making the selection, the combobox will only show the first visible column.  If you want all four columns displayed after selection, you will need to change to a listbox, or add the appropriate unbound text boxes with DLookup formula.
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
much better workaround. that's thinking outside the..um..combobox!
Set the column widths to space your column accordingly

example:
Each column is separated by   ;
column width=   1.5";2";0"

Also = set the LIST WIDTH to equal   (1.5 + 2 + 0   =)            2.5

Scott C
Scott C
Assuming that the intent here is about what's displayed after selection of a single row of the combo...
While concatenation is required to some extent (because you want to display four columns of data at once) - unless you choose to employ four *separate* textbox controls to each display the related item - using another control other than the combo isn't necessarily preferred.

i.e. you can concatenate all four columns of data into the first visible column of the combo.
However this doesn't necessarily lead itself to convenient reading for selection
i.e. you don't usually want
1 - Text1 - Date1 - Value1
2 - Txt2 -  - Value 2
3 -  -  - Value 3

Instead of
1  Text1  Date1  Value1
2  Txt2               Value2
3                        Value3

So you just employ the old technique of allow the first non-zero width column to be too narrow to be visible when dropped down.
e.g.
Rowsource:
SELECT PKID, Field1 + ", " & Field2 + ", " Field3 + ", " Field4, Field1, Field2, Field3, Field4 FROM TableName

CoumnCount:
6

ColumnWidths:
0;0.02;3;3;3;3
(assuming your columns are 3cm/inches long :-)

ListWidth:
12

Hence you have the concatenated values displayed upon selection.