Combo box display

  • Thread starter Thread starter Phil
  • Start date Start date
P

Phil

HI,

I have a combo box which when you click on the dropdown
three fields (last name, first name, and organization) are
displayed in the dropdown. However, when a record is
selected only the last name is shown in the combo box. Is
there a way for all three fields to be displayed?

Thanks,
Phil
 
Not directly, the listbox is better suited for that. However, there are a
couple of ways around this with a combo box, but it depends on exactly how
you are using the combo.

Can you give more details?
 
Hi Roger

I have two tables: a name table (name_id,last, first,
organizaton) and an event tabel(name_id, event, date,
description). I have an event form where I enter the
event, date and description and then I use the combo box
to select a person giving me the name_id to link a person
to the event. I then click on a command button which save
the event record along with keeping the event, date, and
descripton in temp variables. The save button "event"
routine also processes a new record command and the date,
event and description fields are restored using the temp
variables. I then select a new person and click the save
button again, select another person - click save, etc.....

I think this is probably a crude way to enter a lot of
people into an event, but it save re-entering the event
data each time and it works except I would like to have
the full name and organization show in the combo box
before the "save" button is clicked.

Thanks
Phil
 
So you are entering the name_id value into the event table. Good. In that
case, the easiest thing would be to concatenate the values of the fields
into a single expression for your combo box. Something like this:

SELECT name_id, last & ", " & first & ": " & organization As FullName FROM
NameTable

Put this in your RowSource.
Change the number of columns to 2
Change the Column Widths to 0",1"
Leave the BoundColumn as 1

That should do it.
 
Thanks Roger,

That's just what I needed. I found out that it works
without the "As FullName"

Thanks again,
Phil
 
Back
Top