limiting query criteria shows error

J

JB

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.
 
K

Kelvin

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.'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top