gRegulator
Technical User
Hi,
I have written a query and for some reason I am getting an error message.
My code is as follows:
The query has parameters, and if the parameters aren't entered, the query will run, but will be blank. However, if the parameters are filled, i get the following error message:
"This expression is typed incorrectly, or it is too long to be evaluated. Gor example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables"
When I compare this to other queries I have written, I can't see any problems, but for some reason I can't get this to work or figure it out. Does anyone know why I may be getting this problem?
Thanks!
I have written a query and for some reason I am getting an error message.
My code is as follows:
Code:
PARAMETERS [Forms]![frm_dateparameter_q31]![txtStart] DateTime, [Forms]![frm_dateparameter_q31]![txtEnd] DateTime;
SELECT qry_q31_offence_types.Offence , -Sum([Male]) AS [Male Clients], -Sum([Female]) AS [Female Clients]
FROM qry_q31_offence_types
WHERE (((qry_q31_offence_types.Start) Between [Forms]![frm_dateparameter_q31]![txtStart] And [Forms]![frm_dateparameter_q31]![txtEnd]))
GROUP BY qry_q31_offence_types.Offence;
The query has parameters, and if the parameters aren't entered, the query will run, but will be blank. However, if the parameters are filled, i get the following error message:
"This expression is typed incorrectly, or it is too long to be evaluated. Gor example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables"
When I compare this to other queries I have written, I can't see any problems, but for some reason I can't get this to work or figure it out. Does anyone know why I may be getting this problem?
Thanks!