import data between dates

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

Guest

i have a xls table linked to access that has a date field in the format
20050301. I run a query on the linktable, renaming the date fied as "data"
(no heading in xls..) and using CDate
(CDate(Format([datefield],"0000-00-00")), and then display format as medium
date.
So far so good - query now returns the date filed wih nicely formated dates.
However, i want the user to be able to select To and From dates from a form.
Form uses txt input boxes set up as dates in med date format with input masks
etc...

I put in the criteria in trhe query Between fromdate AND todate, but when i
run the query it tells me that is to complex to be evaluated??

I have used very similar methods on another table with success.... any
ideas?

thx
 
You need use:
DateSerial («year», «month», «day»)
I mean:
DateSerial (Left([YourDate],4), Right(Left([YourDate],6),2),
Right([YourDate],2))

And thats it.

Good look
 
Back
Top