Combo box that displays two fields upon selection.

rap1971

Registered User.
Local time
Today, 16:02
Joined
Jan 16, 2001
Messages
23
Me again...

I have a combo box that comes from a condensing_unit table. This table has a numeric primary key (numbered 100-1xx)...each record has a unit_number and a coil_number. There are two of each unit_number using different coil numbers. When I create the combo box it shows both the unit number and the coil number to make the selection, but after the choice is made, only the unit_number shows. How can I display both the unit_number and the coil number selected on the form?

Rebecca
*Am I miserable because I listen to pop music, or do I listen to pop music because I'm miserable?"
 
Try This:

Create a new form (don't choose a table or query where the forms data will come from), and open it in design view.

Add a combobox to it and cancel the wizard when it opens.

Click on the combobox you just added. In the Properties box for that combobox, click in the Row Source field. Then click the ellipsis (...) at the end of the field. That'll open the Query Builder.

Put the tables & queries you want into the upper portion of the Builder.

Now, instead of clicking on the names in the tables to display them in the query grid, type something like this into the field of the first grid column:

Unit&Coil:[Unit_Number]&" "&[Coil_Number]

Close the Query Builder (save the changes).

Now you have to check the comboboxs' properties again, specifically the "column count" property, the "column widths" property and the "bound Column" property.

Set column count = 1, column widths = 2", and bound column = 1 (if not already set that way). Now display the form.

Viola!

But beware,

If you try to reference that combobox, the item the combobox remembers is the bound column, which is now going to be something like "1 1", because we concatenated two table fields together with some spaces to seperate the two values.

Hope this helps,(if not, we can try again!),

Doug.
 
Doug you are an absolutely fabulous individual! It worked like a charm...thank you for replying and making the end of my day brighter than the rest!

Rebecca

**Ignorance is bliss, and that's why I'm so darn happy**
 

Users who are viewing this thread

Back
Top Bottom