[AccessD] Query returns data for wrong time period

Gary Kjos garykjos at gmail.com
Mon Sep 17 12:14:09 CDT 2007


I think you need to describe a little more exactly what the
discrepancy is from what you enter to what data is selected. Are you
getting too much data or not enough?  You are taking into
consideration that date type fields also have TIME included in them
that will sometimes affect selection?  Usually with start dates that
doesn't catch you as much as with end dates. Also are there possibly
date format issues involved?  Perhaps are your dates stored in a
different time zone or something so that they are really not the value
you think they are?

Can you give us some samples of what you entered verses what was
selected and not selected as you expected?

GK

On 9/17/07, Kaup, Chester <Chester_Kaup at kindermorgan.com> wrote:
> When I run the following query the start date of the results is not the same as the start date from the form. The end date works correctly. I have checked the value of StartDate and it appears correct. Suggestions?
>
> SELECT [qry All Manifolds Oil Gas Water].PID, [qry All Manifolds Oil Gas Water].ProductionDate, [qry All Manifolds Oil Gas Water].Oil, [qry All Manifolds Oil Gas Water].Water, [qry All Manifolds Oil Gas Water].Gas, [qry All Manifolds Oil Gas Water].GOR
> FROM [qry All Manifolds Oil Gas Water]
> WHERE ((([qry All Manifolds Oil Gas Water].PID)=[Forms]![frm Select Manifold]![ManifoldList]) AND (([qry All Manifolds Oil Gas Water].ProductionDate)>=[Forms]![frm Time Interval]![StartDate] And ([qry All Manifolds Oil Gas Water].ProductionDate)<=[Forms]![frm Time Interval]![EndDate]))
> ORDER BY [qry All Manifolds Oil Gas Water].ProductionDate;
>
> Chester Kaup
> Engineering Technician
> Kinder Morgan CO2 Company, LLP
> Office (432) 688-3797
> FAX (432) 688-3799

-- 
Gary Kjos
garykjos at gmail.com



More information about the AccessD mailing list