Combobox: how do you handle active/inactive members

hbrems

has no clue...
Local time
Today, 08:25
Joined
Nov 2, 2006
Messages
181
Dear all,

on a continuous form I'm having an issue with a combobox. Hopefully one bright member of these forums is able to help me.

The rowsource of this control is linked to a table 'users'. One field in this table is a 'yes/no' field which is called 'active'. This field simply indicates if the user is still working in our company.

On my form, in my combo I'd like to be able to see the active members only. However this will cause the comboboxes of older records with inactive users to appear as blank.

The ideal situation for me would be to still be able to see the inactive users for applicable records, but to only allow active members to be selected for new records.

I hope that was a somewhat clear explanation. Can you help me?

Kind regards,
Hans B.
 
Can you base the combo box rowsource on a query that limits the rows to active users?
 
You can try something in the where clause...
You have now to select only the active ones something like:
[Active]=true

Add to this:
([Active]=true or [combobox value]=[key value])
And you should allways see only the active records + the selected value.
 
You can try something in the where clause...
You have now to select only the active ones something like:
[Active]=true

Add to this:
([Active]=true or [combobox value]=[key value])
And you should allways see only the active records + the selected value.

This seems to work. Thanks! :)
 
This also works for me but I also the add the following command to the form_current event. mycombo.requery

Now a question to continue on this theme. Anyone got any ideas when such a form is viewed in datasheet view rater than form view. Under the current ideas above what happens is the inactive members are not shown unless you actually click into one of the records.
 
This also works for me but I also the add the following command to the form_current event. mycombo.requery

Now a question to continue on this theme. Anyone got any ideas when such a form is viewed in datasheet view rater than form view. Under the current ideas above what happens is the inactive members are not shown unless you actually click into one of the records.
The underlying query for the combo's Rowsource should already have the Active criteria. Requery should not be necessary.
 

Users who are viewing this thread

Back
Top Bottom