siberien
Nov 12 2006, 02:03 PM
Is it possible to have a combo box with a dropdown list that is a subset of
the value the combo box displays.
I have a list of contacts in a combo box. I only want the dropdown list to
show the "Active" ones (there is a yes/no field in the contacts table called
"Active").
The displayed value in the combo box should show "All" contacts since some
of them have become "Inactive" as time moves on.
If the rowsource for the combo box is set to show only the "active" ones
then records with contacts that are no longer active do not display anything
in the Contact field.
Any help would be much appreciated
Jack Cowley
Nov 12 2006, 02:06 PM
Welcome to Utter Access Forums! -o!
I am having a little trouble following some of your question/comments, but if you want to show only Active contacts then create a query based on the table and put the word True in the criteria line of the Active column. Use this query as the Row Source for the combo box...
Jack
siberien
Nov 12 2006, 09:06 PM
If i do that, when I look at an previous record, if the contact was disactivated there is noting in the field...
Suzy
Jack Cowley
Nov 13 2006, 11:03 AM
Suzy -
I'm sorry, but I am not following you. What do you mean that if the contact is not an Active contact that there is nothing in the field... What field? Are you talking about the form or the combo box? Did you add a Yes/No field to your contact table and did you check all the records that are active? Did you create a query, based on the table, to show only Active contacts? Does the query show the right records?
If you can give us some specific details on what is not working for you we will try and help you find the answer...
Jack
siberien
Nov 15 2006, 03:34 PM
Hi,
QUOTE
I'm sorry, but I am not following you. What do you mean that if the contact is not an Active contact that there is nothing in the field... What field?
The field contact doesn't show anything. See my exemple.
Thank you
Jack Cowley
Nov 15 2006, 04:13 PM
Suzy -
I think I understand what you are getting at... If you want the combo box to show ACTIVE people at one time and ALL people at another time then you have to change the Row Source of the combo box depending on which set of records you want to see.
Is this what you are trying to do? If so, I will send you back your db with that working if that is what you want....
Jack
siberien
Nov 15 2006, 07:42 PM
Yesss. Thank you.
Suzy
Jack Cowley
Nov 15 2006, 08:06 PM
Suzy -
Take a look at the attached and see if it is what you want. The combo box is unbound so it will work properly. If you want to use this combo to add an employee to a record you may want to use code to do it as the combo box can only do so much...
If this is NOT what you want then let me know...
Jack
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.