View Full Version : Combo box query


rupes_mahal
08-28-2001, 07:59 AM
Hi..

I want a combo box to display a drop down menu with results from 4 columns in one table.

The query I have so far is:

Select Distinct Name1,Name2,name3,Name4 from
DoctorsdetailsTBL.

The drop down menu only shows the results from the 'Name1' column and ignores Name2,name3,Name4 columns data.

How can i display data from 4 different columns within one table in a single combo box...

Please help

thank you in advance

Ruby

shacket
08-28-2001, 08:55 AM
Your combo box is receiving all 4 items. To display them, adjust the ColumnCount and ColumnWidths properties.

Note: this will only change what is displayed when your combo box is "open" (displaying options for a choice). Once an option is chosen, your combo box will only display the first visible field.

Rich
08-28-2001, 10:58 AM
=[Name1]&[Name2]&[Name3] etc will display all the fields as one if that is what you want.

rupes_mahal
08-28-2001, 02:06 PM
Hi Rich...

When I use your code, it displays all the 4 fields information as rows in the drop down menu for the combo box.

eg.

name1 name2 name3 name4
ruby max rich harry

thats my table..

when I use you code, it displays in the combo box:

rubymaxrichharry
etc..

What I want is it diplays it like this:

combo box:

ruby
max
rich
harry
...
& so on..

How can I do this please help

Thank you in advance

Ruby

Rich
08-28-2001, 02:25 PM
Use a Union query the help file has examples on how to construct one.
HTH