dvorett wrote:
I'm trying to develop a query where each successive query filters the
options for the next. Optimally the user will select the value from a
list of options, which will then create the value list of options for
the next query.
This auto example might get you started - though it doesn't use Value Lists
for the rowsources. For Value Lists, you'll need to open and iterate
through recordsets based on earlier queries, add values to strings, and set
the list rowsources to the strings.
1st query, in listbox listMakes:
SELECT Make
FROM Makes
ORDER BY Make;
2nd query, in listbox listModels:
SELECT Model
FROM MakesModels
WHERE Make = FORMS.formName.listMakes
ORDER BY Model;
3rd query, in listbox listOptions:
SELECT Option FROM MakesModelsOptions
WHERE Make = FORMS.formName.listMakes
AND Model = FORMS.formName.listModels
ORDER BY Option;
In the AfterUpdate event of listMakes, add the lines:
Me.listModels.Requery
me.listOptions.requery
In the AfterUpdate event of listModels, add the line:
Me.listOptions.Requery