I have three list boxes, the first of which finds a record from a table based on the selection, the selection supplies the data needed for the criteria of the second list, the second list uses a query as row source, the SQL for this is:
SELECT Quotes.QuoteID, Quotes.EsitmatedCloseDate, Quotes.QuoteStatus, Quotes.QuoteStage
WHERE (((Quotes.QuoteStage)<>"Complete") AND ((Quotes.ContactID)=[forms]![Contacts].[ContactID]));
I use a requery once a change is made from the first list box (as all 3 lists are on the same form) simply using:
Private Sub lstContacts_Click()
The final list box uses a query as row source that gets its data for the criteria from the second list box:
SELECT qryQuoteItems.ProductName, qryQuoteItems.Description, qryQuoteItems.Qty, qryQuoteItems.Cost
ORDER BY qryQuoteItems.ProductName;
I use a requery to update this listbox:
Private Sub lstQuotes_AfterUpdate()
All works well bar one thing, if I have data in the third list box and then select a record from the first list box which has NO records in the second list box, the 3rd list box does not update properly, it should refresh to display no records, however, it does not change at all, even if I press the refresh button, the query on its own works fine, in that if no data is entered into the criteria field then no results are displayed, so its almost like its seeing data in the second list box that is not there? Its a simple problem, but an annoying one none the less.
Any help would be great.