import data between dates

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
 
G

Guest

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
 

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