I would like to know whether or not it is possible to create a query which is
displayed as a series of combo boxes or list boxes where the user can select
which options they would like to choose.
I would like to have the option for the user to choose about 5 different
sets of criteria before the query is activated.
Is this a possibility?
Many Thanks In Advance
Kieron White
Bill - 01 Apr 2006 22:14 GMT
Yes, this is very simple to set up in a form. I have something similar
working that allows the user to select among four or five different
combination boxes to limit the list. I use a command button for the user
to indicate the selections are complete and apply the filter criteria to
the list. It does get a bit complicated in the background, but it is
simple for the user.
> I would like to know whether or not it is possible to create a query which is
> displayed as a series of combo boxes or list boxes where the user can select
[quoted text clipped - 8 lines]
>
> Kieron White
-----------------------------------------------------------
> Posted using QuadSucker/News, http://www.quadsucker.com
> ... the ultimate tool for newsgroup downloading!
-----------------------------------------------------------
Ken Sheridan - 02 Apr 2006 18:58 GMT
Kieron:
To make the criteria optional, i.e. the user can select values from none to
five of them you need to test for each having a value or being Null. Firstly
you need an unbound dialogue form with the 5 combo boxes and a button which
opens the query, or better still a form or report based on the query. Then
in the query you reference each combo box as a parameter like so:
SELECT *
FROM MyTable
WHERE
(Field1 = Forms!MyForm!FirstCombo OR Forms!MyForm!FirstCombo IS NULL)
AND
(Field2 = Forms!MyForm!SecondCombo OR Forms!MyForm!SecondCombo IS NULL)
AND
(Field3 = Forms!MyForm!ThirdCombo OR Forms!MyForm!ThirdCombo IS NULL)
AND
(Field4 = Forms!MyForm!FourthCombo OR Forms!MyForm!FourthCombo IS NULL)
AND
(Field5 = Forms!MyForm!FifthCombo OR Forms!MyForm!FifthCombo IS NULL);
Ken Sheridan
Stafford, England
> I would like to know whether or not it is possible to create a query which is
> displayed as a series of combo boxes or list boxes where the user can select
[quoted text clipped - 8 lines]
>
> Kieron White