D
dave_b
I have exported some data from the local MLS system into an Access database
and want to run some statistics on the sales information, using a number of
different queries which will feed graphs in Excel, etc...
I have a form set up for choosing the data which include the city, the
development, what kind of property it is (condo, single family residence,
etc.)
The problem I have is why no selection is made. For example, the query
looks for a city selection from a drop-down box; if I choose a city, the
query runs perfectly. If I do not choose a city - leaving it blank - the
query produces no results. I want "no city selected" or "all cities" to
produce a query that has all cities in it.
I've tried various 'iif' statements in the criteria - and nothing has
worked. I've tried checking the drop-down for null and for "" I've created
a text box with a value equal to the dropdown and tried to query on that -
and that has not worked. I even tried doing that with all the cities typed
into it, and that didn't work either.
I have seven different feilds that might or might not hold criteria. (City,
development, property type, land type, sales date, size of house, size of
lot.) There must be a way to hand a situation where no selection is made:
it would be real pain to have to code SQL for every possible combination of
these seven inputs!
Ideas would be highly appreciated!
and want to run some statistics on the sales information, using a number of
different queries which will feed graphs in Excel, etc...
I have a form set up for choosing the data which include the city, the
development, what kind of property it is (condo, single family residence,
etc.)
The problem I have is why no selection is made. For example, the query
looks for a city selection from a drop-down box; if I choose a city, the
query runs perfectly. If I do not choose a city - leaving it blank - the
query produces no results. I want "no city selected" or "all cities" to
produce a query that has all cities in it.
I've tried various 'iif' statements in the criteria - and nothing has
worked. I've tried checking the drop-down for null and for "" I've created
a text box with a value equal to the dropdown and tried to query on that -
and that has not worked. I even tried doing that with all the cities typed
into it, and that didn't work either.
I have seven different feilds that might or might not hold criteria. (City,
development, property type, land type, sales date, size of house, size of
lot.) There must be a way to hand a situation where no selection is made:
it would be real pain to have to code SQL for every possible combination of
these seven inputs!
Ideas would be highly appreciated!