Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limit items in combobox based on Table/Query Yes/No

Status
Not open for further replies.

nastar1

Technical User
Nov 1, 2005
122
US
I have a Customer table that includes a Yes/No field that when checked identifies a customer who is no longer active.

On my form I have a combobox bound to a query of the Customer table. I want to limit the names in the combobox to only those customers who are still active. However, I've found that if I set the Yes/No criteria in the query to No, the history records no longer show the customer name.

Is there a way to restrict the names in the combobox yet at the same time keep the integrity of the inactive customer names in the old records?
 
How are ya nastar1 . . .

Criteria should take the form of:
Code:
[blue]   WHERE [[purple][b]CheckboxName[/b][/purple]]=False[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Change the Row Source property for the Combobox to something like thus:
Code:
"SELECT [Customer name] FROM CustomerInfo WHERE Active = true;

or you can use the query wizard when you click on the row source property to add the Active field to the Row Source query, uncheck the Show box and enter the condition "is true" for the the Active field
 
Both suggestions work great at limiting the items that display in the combo box, however both suggestions remove the previous entry for existing records when those records have 'inactive' customers already assigned.

I need to keep the inactive customers displayed when old records are being reviewed. I'd only like to restrict what is displayed in the items of the combobox.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top