combo box content

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

While using the wizard to create a combobox I have chosen 3 fields to include.
Now I am looking for a way to display all three fields by vba.
Fields are ContactID,CompanyName,Telephone. I can display only 1 field.
Does anyone know the code to display?
I have found something like me.controlbox.column(x) but this does not seem
to work.
Greetings,
Harry
 
Depending on how you set the Column Widths property of the combo, the 3
fields will only show when the combo is in its dropped down state. If you
want to show the 3 fields all the time, then you should use a List Box
instead of a combo box.
 
Hi Klatuu,

Perhaps I did not fully clear my question. I wanted to fill in a textbox
with the result of one of the three columns of the combobox.
Doing some "claywork" I found the solution.
dim strA as string
me.textbox1=Me![Combo1].Column(0)

and so on.

Any way thanks for your attention.
Greetings,
Harry
 
Okay, that works; however,
me.textbox1=Me![Combo1].Column(0)
is the same as
me.textbox1=Me![Combo1]

You only really need to use the column reference if it is other than 0

--
Dave Hargis, Microsoft Access MVP


Harry said:
Hi Klatuu,

Perhaps I did not fully clear my question. I wanted to fill in a textbox
with the result of one of the three columns of the combobox.
Doing some "claywork" I found the solution.
dim strA as string
me.textbox1=Me![Combo1].Column(0)

and so on.

Any way thanks for your attention.
Greetings,
Harry

Klatuu said:
Depending on how you set the Column Widths property of the combo, the 3
fields will only show when the combo is in its dropped down state. If you
want to show the 3 fields all the time, then you should use a List Box
instead of a combo box.
 
Back
Top