Retiring values from Combo Boxes

G

Guest

I am currently using combo boxes based on a query that displays a different
column than the one that is bound to the table column.

I want to allow the users to “retire†a value in the look-up table, so I
added a column named Active with a data type of Yes/No. I then added
criteria to the combo recordset to like “WHERE Active = YESâ€

This approach prevents using the retired values, but has an un-intended
consequence of displaying all existing records with a retired value as null.

Any suggestions on how to “retire†values from combo boxes while allowing
the users to still see the retired values in existing records?

Thanks
 
E

Eric Schittlipz

TXyota said:
I am currently using combo boxes based on a query that displays a different
column than the one that is bound to the table column.

I want to allow the users to "retire" a value in the look-up table, so I
added a column named Active with a data type of Yes/No. I then added
criteria to the combo recordset to like "WHERE Active = YES"

This approach prevents using the retired values, but has an un-intended
consequence of displaying all existing records with a retired value as
null.

Any suggestions on how to "retire" values from combo boxes while allowing
the users to still see the retired values in existing records?

Thanks



Use a second part of the where clause, eg tblOrders has a field SalesPerson
which is an ID (long integer) from the field tblStaff.StaffID, to show who
got the order.

.... & " WHERE tblStaff.Active=True Or tblStaff.ID=" & Me!SalesPerson

But remember you will have to re-query the combobox each time you move to
another record (in the form's OnCurrent event). Another option would be to
not allow edits directly - have a change button which pops up a list of
available values.
 

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