limiting query criteria shows error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We have a form 'Invoice' which contains a query. We have to limit the query to a specified time frame. For that

we made 2 textboxes, BeginningDate and EndingDate with the criteria field in query builder set t

Is Not Null And Between [Forms]![Invoice]![BeginningDate] And [Forms]![Invoice]![EndingDate

But it gives the error 'This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables.

Please help.
 
When you are evaluating dates from a text box you need to include # before
and after the date.

Is Not Null And Between "#"&[Forms]![Invoice]![BeginningDate]&"#" And
"#"&[Forms]![Invoice]![EndingDate]&"#"

Kelvin

JB said:
We have a form 'Invoice' which contains a query. We have to limit the
query to a specified time frame. For that,
we made 2 textboxes, BeginningDate and EndingDate with the criteria field in query builder set to

Is Not Null And Between [Forms]![Invoice]![BeginningDate] And [Forms]![Invoice]![EndingDate]

But it gives the error 'This expression is typed incorrectly, or it is too
complex to be evaluated. For example, a numeric expression may contain too
many complicated elements. Try simplifying the expression by assigning parts
of the expression to variables.'
 
Back
Top