Multiple Selection to Run Query

  • Thread starter Thread starter kirstie adam
  • Start date Start date
K

kirstie adam

Hi All,

I have a form which shows site records.

I want the user to be able to search by

SiteType and SiteHeight (showing all records matching that type of site with
that height)
OR
just SiteType (showing all records for all types)
OR just SiteHeight (showing all records for all heights)

I can only get the 1 or the other to work, can anyone tell me how to do
this?

The form is called "frm search multiple" and is currently bound to a qry
called "qry search multiple"

In the query, under the field SiteType i have the following

forms!frm seach multiple!cmbosite (referring to the combo box displaying
site type options
and under field SiteHeight i have
forms!frm seach multiple!cmboheight

CAN ANYONE HELP?

Kirstie
 
kirstie said:
I have a form which shows site records.

I want the user to be able to search by

SiteType and SiteHeight (showing all records matching that type of site with
that height)
OR
just SiteType (showing all records for all types)
OR just SiteHeight (showing all records for all heights)

I can only get the 1 or the other to work, can anyone tell me how to do
this?

The form is called "frm search multiple" and is currently bound to a qry
called "qry search multiple"

In the query, under the field SiteType i have the following

forms!frm seach multiple!cmbosite (referring to the combo box displaying
site type options
and under field SiteHeight i have
forms!frm seach multiple!cmboheight


Try changing the criteria to:

forms![frm seach multiple]!cmbosite OR forms![frm seach
multiple]!cmbosite Is Null

and

forms![frm seach multiple]!cmboheight OR forms![frm seach
multiple]!cmboheight Is Null
 
Marshall,

Excellent thank you.

Kirstie

Marshall Barton said:
kirstie said:
I have a form which shows site records.

I want the user to be able to search by

SiteType and SiteHeight (showing all records matching that type of site with
that height)
OR
just SiteType (showing all records for all types)
OR just SiteHeight (showing all records for all heights)

I can only get the 1 or the other to work, can anyone tell me how to do
this?

The form is called "frm search multiple" and is currently bound to a qry
called "qry search multiple"

In the query, under the field SiteType i have the following

forms!frm seach multiple!cmbosite (referring to the combo box displaying
site type options
and under field SiteHeight i have
forms!frm seach multiple!cmboheight


Try changing the criteria to:

forms![frm seach multiple]!cmbosite OR forms![frm seach
multiple]!cmbosite Is Null

and

forms![frm seach multiple]!cmboheight OR forms![frm seach
multiple]!cmboheight Is Null
 
Back
Top