Multiple Parameter Crosstab query filter by form

  • Thread starter Thread starter hdihnen
  • Start date Start date
H

hdihnen

Hello All:

I have a multiple parameter crosstab query. I have three columns I am
filtering on and have declared the parameters also. The crosstab
query works great when I run it from just the query. But I would like
to use my form to filter the query. In my criteria I have placed the
following:

Column: Area
Criteria: [forms]![frmEstimatesEdit]![txtRanchArea] or [forms]!
[frmEstimatesEdit]![txtRanchArea]is null

Column: LotNumber
Criteria: [forms]![frmEstimatesEdit]![txtFilterLotNumber] or [forms]!
[frmEstimatesEdit]![txtFilterLotNumber]is null

Column: MasterVariety
Criteria: [forms]![frmEstimatesEdit]![txtMasterVariety]or [forms]!
[frmEstimatesEdit]![txtMasterVariety]is null

I have included the Or Is Null because my user may decide to only
query on one, two or all three text boxes on my form.

In the declared parameters I have only put the first have without the
Or Is Null half and declared them as text.

As I said the query works fine when run by itself and left to bring up
pop ups for input. But if I run it through the form I get no
results. It will only work on the form if I enter text into all three
text boxes. So I tried putting in the whole Or Is Null line into the
declared parameters and I get an invalid bracketing error.

Please help. How can I get this query to work properly with my filter
by form.

Heidi
 
Back
Top