If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Combo Box to display only "active" records
Hi,
I have a combo box based on a list of records in table. Overtime I may want to "de-activate" (Employee.Active=No) records in the list so that a user can longer chose it from the list, but I don't want previously selected records from list to be affected. I added a WHERE Employee.Active=Yes condition to the row source. My drop-down list no longer displays inactive records, but when I look at previous entries the record displayed is also blank. How do I only get this to apply to new records being created? Thanks |
#2
|
|||
|
|||
Combo Box to display only "active" records
Yes, that's a common scenario, Nancy.
One workaround is to sort the inactive records to the bottom of the list. That way it can still display the old records, but you choose the active ones first when typing in the combo. The RowSource of the combo would be something like this: SELECT EmployeeID, Surname & ", " + FirstName AS FullName FROM tblEmployee ORDER BY Active, Surname, FirstName; -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Nancy" wrote in message ... I have a combo box based on a list of records in table. Overtime I may want to "de-activate" (Employee.Active=No) records in the list so that a user can longer chose it from the list, but I don't want previously selected records from list to be affected. I added a WHERE Employee.Active=Yes condition to the row source. My drop-down list no longer displays inactive records, but when I look at previous entries the record displayed is also blank. How do I only get this to apply to new records being created? Thanks |
Thread Tools | |
Display Modes | |
|
|