D
Dsperry101 via AccessMonster.com
Hello
I want to use date variables in the criteria of a query.
When I put Between #1-1-07# and #1-30-07# it works
but if I try to use a date variable it doesn't work. In
the query by example view. The field in the database
is a string but I convert to a date using
Datevalue([work_order_received]). I want to calculate
a date like this in the Field:
dateback: datefrom: ( year(Date())-1 , 1 ,1)
dateto: (year(Date())-1,12,31)
When I try to use the variables (datefrom dateto) in the
criteria statement this doesn't work
Between datefrom and dateto
gives me invalid date format and access throws quotes
around my variables.
Any suggestions ?
I want to use date variables in the criteria of a query.
When I put Between #1-1-07# and #1-30-07# it works
but if I try to use a date variable it doesn't work. In
the query by example view. The field in the database
is a string but I convert to a date using
Datevalue([work_order_received]). I want to calculate
a date like this in the Field:
dateback: datefrom: ( year(Date())-1 , 1 ,1)
dateto: (year(Date())-1,12,31)
When I try to use the variables (datefrom dateto) in the
criteria statement this doesn't work
Between datefrom and dateto
gives me invalid date format and access throws quotes
around my variables.
Any suggestions ?