limiting values in lookup list

B

Brant

On a form I have a combo box that uses a lookup list to display values. The
row source type for the combo box is a query. I need to "Limit to List".

I would like to have the query return only values that are "active"
(there's an active indicator column in the underlying table).

I would like to display only active values in the drop-down list. But, I
want to display values in the combo box whether they're active or not. This
will allow me to show the value for old records that have an inactive value,
but the user can only use active values for new and updated records.

Any ideas? Thank you.
 
K

Klatuu

You won't be able to do that. It sounds like you combo is a bound control.
Combos work best for this sort of purpose when they are not bound. Use a
bound text box to display the current value in the record.

I assume you know you can limit what the combo displays by filtering its row
source:
SELECT SOME_VALUE FROM MyTable WHERE ACTIVE_INDICATOR = "Active"
(or True or whatever says it is active)

Then, to populate the bound text box, use the combo's After Update Event:

Me.MyTextBox = Me.MyComboBox
 
Top