I have a table with a field defined as Date/Time. When I run a query inputting FROM & THRU parameter values from a form to select a range, the query returns all rows from the table that are not NULL. Wondering why the range part isn't working. Thanks.
Kevin Robertson
@Reply 3 months ago
We can't see your Query.
Please post you criteria.
David AndersonOP
@Reply
3 months ago
As a followup to my original question, here's the query:
SELECT
DVsysNames.DVIMS_ID,
DVsysNames.ClientDOB,
DVsysNames.Offender,
DVsysNames.ClientLastName,
DVsysNames.ClientFirstName,
DVsysNames.ClientMiddleName,
DVsysNames.ClientOtherName,
DVsysNames.RelatedTo,
DVsysNames.ClientRace,
DVsysNames.Notes,
DVsysNames.CMS_ID,
DVsysNames.Internal_ID,
DVsysNames.EnteredBy
FROM DVsysNames
WHERE
((DVsysNames.ClientDOB) Between [Forms]![DVIMSysNamesSearchF]![DOBfrom] And [Forms]![DVIMSysNamesSearchF]![DOBthru])
ORDER BY DVsysNames.ClientLastName, DVsysNames.ClientFirstName
;
David AndersonOP
@Reply
3 months ago
It seems Access was treating my date field as a string, so using the CDate() function seems to have solved my issue. Sorry to have taken anyone's time.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visitor Forum.