comboboxes- more than bound column (1 Viewer)

disgruntled

Registered User.
Local time
Today, 09:26
Joined
Jul 3, 2001
Messages
38
Good Morning all.....I have had an ongoing dilema which i have been ignoring thus far. In a como box with say 3 columns. After you pick from the list how do i get all 3 to remain in the box as opposed to just the bound column????

Thanks in advance
 

DALeffler

Registered Perpetrator
Local time
Today, 02:26
Joined
Dec 5, 2000
Messages
263
You cannot get three columns to remain in the combo box after a selection is made from the drop down list (at least in Access 97).

See help/contents and index/combo boxes, hiding columns/Hide a column in a list box or a combo box – Note at bottom…

In a combo box, the first visible column is displayed in the text box portion of the combo box when the list isn't displayed.

The above quote is referring to the “Column Widths” property on the property sheet for the combo box. The first column with a positive, non-zero value is the one displayed after the selection from the drop down list has been made.

So what I typically do to get “multiple columns” to display after the selection has been made is to edit the row source property of the cmbbx by clicking on the ellipsis (…). Then I create a calculated field in the row field of the SQL Statement: Query Builder that concatenates the data from the table fields I want to see after the selection is made. Like so:

SQL Statement: Query Builder grid:
Code:
Field: | TableIDFld | ClcFldNme:[MyTable]![Fld1] & “  “ & [MyTable]![Fld2] & “  “ & [MyTable]![Fld3]  |
Table: | MyTable    |                                                                                 |
Sort:  |            |                                                                                 |
Show:  | True       | True                                                                            |

Back on the property sheet for the control, I set these properties to:

Column count :2
Column widths: 0”;3”
Bound column: 1

See how that works?

Doug.

[This message has been edited by DALeffler (edited 07-27-2001).]
 

Users who are viewing this thread

Top Bottom