J
JOHN
I post a problem earlier this morning... i pasted the
problem and the reply at bottom of this posting
when i tried to enter this expression "Days Pack Out: CInt
(Date() - [Pack Out])" in the parameters i got this error
message "The Expression is typed incorretly, or it is too
complex to be evaluated. For example, a numeric
expression may contain to many coplicated elements. Try
simplifying by assgning parts of the expression to
variables." in the querie i have field set to "Days Pack
Out: Date()-[Pack Out]". i have criteria set to "Between
[Enter minimum days pack out] And [Enter maximim days pack
out]". and sort set to " ascending
then i tried not puting any parameters in and setting
field to "Days Pack Out: CInt(Date() - [Pack Out])"
so then i tried to set the criteria to "Between CInt
([Enter minimum days pack out] And [Enter maximim days
pack out])"
They both resulted in the same error message...did i enter
the parameter in the wrong spot possibly? or set it to the
wrong data type?
===========================================================
===========================================================
It looks like the query is considering your Days Pack Out
and/or the two
parameters as text. You can force it to do a numeric
compare by explicitly
declaring the parameters as Integer (choose Parameters
from the Query menu)
and by forcing a convert of Days Pack Out:
Days Pack Out: CInt(Date() - [Pack Out])
--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
problem and the reply at bottom of this posting
when i tried to enter this expression "Days Pack Out: CInt
(Date() - [Pack Out])" in the parameters i got this error
message "The Expression is typed incorretly, or it is too
complex to be evaluated. For example, a numeric
expression may contain to many coplicated elements. Try
simplifying by assgning parts of the expression to
variables." in the querie i have field set to "Days Pack
Out: Date()-[Pack Out]". i have criteria set to "Between
[Enter minimum days pack out] And [Enter maximim days pack
out]". and sort set to " ascending
then i tried not puting any parameters in and setting
field to "Days Pack Out: CInt(Date() - [Pack Out])"
so then i tried to set the criteria to "Between CInt
([Enter minimum days pack out] And [Enter maximim days
pack out])"
They both resulted in the same error message...did i enter
the parameter in the wrong spot possibly? or set it to the
wrong data type?
===========================================================
===========================================================
It looks like the query is considering your Days Pack Out
and/or the two
parameters as text. You can force it to do a numeric
compare by explicitly
declaring the parameters as Integer (choose Parameters
from the Query menu)
and by forcing a convert of Days Pack Out:
Days Pack Out: CInt(Date() - [Pack Out])
--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)