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)
polkadotAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
set the column count of the combo to 4
0
Rey Obrero (Capricorn1)Commented:
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
0
TWBitCommented:
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.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Rey Obrero (Capricorn1)Commented:
oops sorry, didn't read the q carefully..

you can do this using a textbox  (txtDummy) that you will place on top of the combo box. place it in such a way the only the dropdown arrow is visible

private sub combo_afterUpdate()

me.txtDummy.setfocus
me.txtDummy=me.combo.column(0) & "|" & me.combo.column(1) & "|" & me.combo.column(2)& "|" & me.combo.column(3)

end sub
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TWBitCommented:
much better workaround. that's thinking outside the..um..combobox!
0
clarkscottCommented:
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
0
Leigh PurvisDatabase DeveloperCommented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.