
Originally Posted by
jimrockford
I am working on a cigar dossier database used to track cigar inventory and reviews and have an issue with a query tied to a combo box that has me stumped. My knowledge of Access is limited, so this might be an easy fix.
Anyway, two tables and two queries are involved. The first table (Humidor) contains details about all of the cigars a person has purchased. The second table (Cigar_Dossier) contains reviews of cigars from the Humidor table. The first query (Cigars_Smoked_Query) returns the number of Cigar Dossier entries that correspond to each Humidor entry. And, finally, the query that is giving me trouble is tied to a combo box (Description) on the Cigar Dossier form used to select a cigar to review.
As written, the Description combo box pull down lists a selection of fields from all of the cigars in the Humidor. This is cumbersome because many of those entries are from old purchases where the cigars have already been smoked. So, I'm attempting to limit the pull down list to only cigars where the quantity remaining is greater than zero. My solution was to add a where clause to the query of [Quantity_Purchased] - [CountOfID] > 0. CountOfID is from the Cigars_Smoked_Query and is the number of Cigar Dossier entries for each Humidor entry.
That successfully limited the pull down list to show only cigars still in the Humidor inventory. However, it had the side effect of causing the Description field for all existing entries in the Cigar Dossier table to display as blank (except for those where some inventory still remained).
That, finally, leads to my question. How can I restrict the pull down list for the Description combo box without restricting the display of previous entries?