Combo Box data

  • Thread starter Thread starter Krisse
  • Start date Start date
K

Krisse

I have a combo box based on a query that selects only
active items from a table. (There is a yes/no field in
the table to inactivate items).

The bound field is the numeric key and the displayed field
is the short item description.

My problem is that when displaying a record whose item is
now inactive, the numeric key is displayed instead of the
description.

How can I keep the dropdown correctly displaying only
active items for data entry purposes and still show the
description of the now inactive item for reviewing
purposes?

Thanks!
 
Krisse said:
I have a combo box based on a query that selects only
active items from a table. (There is a yes/no field in
the table to inactivate items).

The bound field is the numeric key and the displayed field
is the short item description.

My problem is that when displaying a record whose item is
now inactive, the numeric key is displayed instead of the
description.

How can I keep the dropdown correctly displaying only
active items for data entry purposes and still show the
description of the now inactive item for reviewing
purposes?

You need another criteria in your ComboBox RowSource.

SELECT [numeric key], [item description]
FROM YourTableName
WHERE [inactive] = 0
OR [numeric key] = Forms!YourFormName!YourComboBoxName
 
Thanks, Rick! I'll change my rowsource from my query name
to a select statement like you described.

-----Original Message-----
Krisse said:
I have a combo box based on a query that selects only
active items from a table. (There is a yes/no field in
the table to inactivate items).

The bound field is the numeric key and the displayed field
is the short item description.

My problem is that when displaying a record whose item is
now inactive, the numeric key is displayed instead of the
description.

How can I keep the dropdown correctly displaying only
active items for data entry purposes and still show the
description of the now inactive item for reviewing
purposes?

You need another criteria in your ComboBox RowSource.

SELECT [numeric key], [item description]
FROM YourTableName
WHERE [inactive] = 0
OR [numeric key] = Forms!YourFormName!YourComboBoxName


.
 
Back
Top