Kaup, Chester
Chester_Kaup at kindermorgan.com
Wed Aug 10 15:56:31 CDT 2005
I have the following at the start of a module: Dim MyQDef5 as QueryDef DIM myds7 as Recordset Set MyQDef5 = MyDb.QueryDefs("qry Fluid Type One Pattern") Later in the code I have the following: Set myds7 = MyQDef5.OpenRecordset() FluidType = myds7.Fields(3) The SQL of the query "qry Fluid Type One Pattern" is as follows SELECT Pattern, Date, CumTotalInj, (Select Fluid from [qry Pattern WAG Scheme] where [qry Pattern WAG Scheme]![Cum_Toti_hcpv] =(Select Max (Cum_Toti_hcpv) from [qry Pattern WAG Scheme] where [qry Pattern WAG Scheme]![Cum_Toti_hcpv] <= [tbl Cum Total Injection One Pattern]![CumTotalInj] )) AS FluidType FROM [tbl Cum Total Injection One Pattern]; The table "tbl Cum Total Injection One Pattern" has 617 records in it but the query only returns one record. I would expect to see 617 records. Chester Kaup Engineering Technician Kinder Morgan CO2 Company, LLP Office (432) 688-3797 FAX (432) 688-3799 No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.