selected combo show multiple columns

jacque_56

New member
Local time
Today, 04:52
Joined
Jun 5, 2003
Messages
6
I have a combo box on a form that is taken from an ID table (i.e., Organization, Last Name, First Name, Address, etc.)

The primary key for the ID table is an autonumber ID number. The ID number is the 'bound' column and is saved in a new table along with the rest of the information on this form.

I set up a combo box that works fine, but

once selected, it shows only the Last Name column in the box. Can I set this up to show both the Organization and Last Name? (the entries are for both individuals and organizations and both columns are not populated for every entry)

Confusing enough?

PLEASE HELP
 
Simple answer is yes.

Here are the details of what you need to do if I understand your question correctly.

First, go to the properties for the combo box and there is a property called "Row Source". Click on the box where you can edit it, and a dropdown arrow as well as a box with 3 small dots appear.

Click on the box with three small dots.

A query view comes up.

[Now this is where how I interpret it could be different]
Right now on your query view, you would have your ID field and your LastName field. You need to drag the organizaton field from the table down to the query below, so you would now have three fields (ID, LastName, and Organization)

Close the query and choose yes when it asks if you want to save all this SQL language stuff.

Now, back on the property box, go to the column count and increase the number by 1 (since you added one more column to the query). Then, a couple of entries below column count, there is an option called column width. This is the width of each column, in inches, each separated by a comma. So, go to the end and add another column width, something similar to what the others are. The columns that are 0" are "hidden" columns, usually the primary key is like that.

Hope this helps a little. If I didn't interpret right, I can try again!

-Chris
 
Need the view after selection to show multiple columns

I already have all the columns listed in the query.

When I hit the down arrow on the combo box the entire list shows up as I set up in the wizard including Organization - Last_Name - First_Name.

Its after I select one that I would like to see both the Organization and the Last Name column from the selected row. Currently it only shows the Last Name (this is the first column after the primary key (ID)

Does that make sense?
 
sample

If you think you might know what to do and it would help to have a copy of the database (its' small) to look at, let me know.

Note on the Golf 2003 Data Form. When you use the combo box and select an item from the Names table that is an organization without a name that the combo box is blank.

HELP
 
Pat Hartman said:
When I want to show multiple columns in a "closed" combo, I concatenate the columns in the combo's query. For example, if you want your combo to show LastName, FirstName rather than just last name, concatenate the fields in your query.

Select PersonID, LastName & ", " & FirstName As FullName
From tblPerson
Order by LastName, FirstName;

This looks like the solution I may be looking for....but how do you cocatenate them?
 
I don't know where to go do that at...also, my fields aren't coming from a query. They are coming from a table.

They are all displayed in the combo however, once selected only the 1st column is displayed.

I want them all to show.
 
When you are in the form design view, bring up the property window for the Combo Box. Then go to "Row Source", which is on the Data tab as well as the All tab. Clicking on the Row Source property will bring up a small button with three dots. Click on that button. That brings up a query view.

When at that Query, in the field name is where the concantention goes. If afterwards all the fields don't show up, you need to go back to the Combo Box properties and change the "Column Count" property to the number of columns you want to have, and edit the "Column width" property so that you can see all the columns.
 

Users who are viewing this thread

Back
Top Bottom