T
TheCaptain
Hello,
I am using a form that you input search criteria. You then hit a button and
it runs my query off of the information in the form. Problem is, when I run
the query it returns my results and results that have no relation to the
search data.
For ex.
If I search for sales between $5 and $10 the query returns all the
reccords between those two numbers. It also returns records that do not
have any sales information filled out. This is very frustrating. Here is a
sample of the SQL code I am using:
([Production.sales] Between [Forms]![Form1].[salesfrom] And
[Forms]![Form1].[salesto] OR [Production.sales] Between
[Forms]![Form1].[salesfrom] And [Forms]![Form1].[salesto] Is Null)
Table Name = Production
Form Name = Form1
Form Parameter names = "salesfrom" and "salesto"
Do I have to write in a statement like "if blank do not show record"? If
so, what?
Please help,
Thanks
I am using a form that you input search criteria. You then hit a button and
it runs my query off of the information in the form. Problem is, when I run
the query it returns my results and results that have no relation to the
search data.
For ex.
If I search for sales between $5 and $10 the query returns all the
reccords between those two numbers. It also returns records that do not
have any sales information filled out. This is very frustrating. Here is a
sample of the SQL code I am using:
([Production.sales] Between [Forms]![Form1].[salesfrom] And
[Forms]![Form1].[salesto] OR [Production.sales] Between
[Forms]![Form1].[salesfrom] And [Forms]![Form1].[salesto] Is Null)
Table Name = Production
Form Name = Form1
Form Parameter names = "salesfrom" and "salesto"
Do I have to write in a statement like "if blank do not show record"? If
so, what?
Please help,
Thanks