Combo Box data

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!
 
R

Rick Brandt

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
 
K

Krisse

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


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top