Querying Date Problems

M

MarkBichener

I have a query that I wish to show only those records within a date range.
Querying it like : >#01/01/2005# works fine, however when I want to make it
user definable using : >[Start_Date] it just ignores the input and shows the
full list.

The only thing about the database that is slightly out of the ordinary is
that the date fields are originally collected as text input (to allow for
other input rather than just date). However the dates are stripped out and
converted to date format in a separate query using : myDate_complaint_recd:
DateSerial(Right([MB_DateComplaintRecd],4),Mid([MB_DateComplaintRecd],4,2),Left([MB_DateComplaintRecd],2))
 
J

John Spencer

Try forcing the data type using CDate
CDate([Start_Date])

Access is probably interpreting the input as a division statement.


MarkBichener said:
I have a query that I wish to show only those records within a date range.
Querying it like : >#01/01/2005# works fine, however when I want to make
it
user definable using : >[Start_Date] it just ignores the input and shows
the
full list.

The only thing about the database that is slightly out of the ordinary is
that the date fields are originally collected as text input (to allow for
other input rather than just date). However the dates are stripped out
and
converted to date format in a separate query using :
myDate_complaint_recd:
DateSerial(Right([MB_DateComplaintRecd],4),Mid([MB_DateComplaintRecd],4,2),Left([MB_DateComplaintRecd],2))
 

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

Similar Threads


Top