Combo Box Showing only bound column when choice is made -- the new normal?

  • Thread starter Thread starter plh
  • Start date Start date
P

plh

Office 2010:

I have a Combo Box with this Row Source

SELECT tblTools.IDTool, tblTools.Tool, tblTools.Material,
tblTools.Type, tblTools.TNumber, tblTools.Location1033, tblTools.Bin,
tblTools.LocationTC, tblTools.Size FROM tblTools;

I change this with code which adds a "LIKE" statement according to the
value from a text box:

sRowSource = "SELECT tblTools.IDTool, tblTools.Tool,
tblTools.Material, tblTools.Type, " _
& "tblTools.TNumber, tblTools.Location1033, tblTools.Bin,
tblTools.LocationTC, tblTools.Size" _
& " FROM tblTools " _
& "WHERE (((tblTools.Tool) Like '*" & UCase(Me.txtSelect.Value) &
"*'));"

With Me
.cmbToolFilter.RowSource = sRowSource
End With

What bothers me is that although columns are shown when the combo box
is dropped down, only the value in the bound column shows in the box
when a choice is made. I would like to see the other columns as well.
I searched over the property list and there does not be a property to
do that. Is there one? I Am I just missing it without knowing it?
Thanx,
-plh
 
plh said:
Office 2010:
I have a Combo Box  with this Row Source
SELECT tblTools.IDTool, tblTools.Tool, tblTools.Material,
tblTools.Type, tblTools.TNumber, tblTools.Location1033, tblTools.Bin,
tblTools.LocationTC, tblTools.Size FROM tblTools;
I change this with code which adds a "LIKE" statement according to the
value from a text box:
sRowSource = "SELECT tblTools.IDTool, tblTools.Tool,
tblTools.Material, tblTools.Type, " _
& "tblTools.TNumber, tblTools.Location1033, tblTools.Bin,
tblTools.LocationTC, tblTools.Size" _
& " FROM tblTools " _
& "WHERE (((tblTools.Tool) Like '*" & UCase(Me.txtSelect.Value) &
"*'));"
With Me
   .cmbToolFilter.RowSource = sRowSource
End With
What bothers me is that although columns are shown when the combo box
is dropped down, only the value in the bound column shows in the box
when a choice is made. I would like to see the other columns as well.

The value displayed in the text portion on the combo box
does not have to be the bound column.  It is the first
visible (non zero width) column in the drop list as
specified in the ColumnWidths property.

To display other columns you need to use an additional text
box with for each column you want to display.  Each text box
would use an expression like:
    =cmbToolFilter.Column(N)
where N is the zero based number of the column in the combo
box's row source query.

--
Marsh
MVP [MS Access]- Hide quoted text -

- Show quoted text -

Thanx for the memory jog, I haven't put it in yet but have done
similar so know it will be fine.
-plh
 
Back
Top