[AccessD] Query result problem

Stuart McLachlan stuart at lexacorp.com.pg
Wed Sep 30 16:47:03 CDT 2009


I'd guess that's it's the Date resrtiction combined with the INNER JOIN.

Are there any records with ProductionMonth values less than 4/1/2008 in 
[qry Injection Data for Oil and Gas Production Allocation]

On 30 Sep 2009 at 10:56, Kaup, Chester wrote:

> When I run the following query I only get results from 4/1/2008 forward. This worked fine in Access 2003. I am now using Access 2007.
> Data from 1/1/1995 to 4/1/2008 is 0's if that makes a difference.
> No I did not write these queries - an engineer did.
...
> 
> SELECT [qry Injection Data for Oil and Gas Production Allocation].Well_In_CO2PAT, 
...
> FROM [qry Injection Data for Oil and Gas Production Allocation] 
> INNER JOIN [qry Injection Data for Oil and Gas Production Allocation] AS [qry Injection Data for Oil and Gas Production Allocation_1] 
> ON ([qry Injection Data for Oil and Gas Production Allocation].Well_in_CO2PAT_API = [qry Injection Data for Oil and Gas Production Allocation_1].Well_in_CO2PAT_API) 
> AND ([qry Injection Data for Oil and Gas Production Allocation].Other_Pattern_as_Well_API = [qry Injection Data for Oil and Gas Production Allocation_1].Other_Pattern_as_Well_API)
...
>WHERE
...
> AND (([qry Injection Data for Oil and Gas Production 
> Allocation_1].ProductionMonth)=DateAdd("m",-1, [qry Injection Data for
> Oil and Gas Production Allocation]![ProductionMonth]))) 




More information about the AccessD mailing list