M
mscertified
I have a table that when I run a GROUP BY query on it, it only groups up to a
certain point, then it returns ungrouped data. This has me completely
bewildered. At
some point I removed the primary key from this table (for unrelated reasons)
and I believe that is what triggered the problem. I have already tried
recreating the table and copying in all the data. This fixed the problem for
existing records but all newly added records again will not group.
This is the query that feeds the report:
SELECT RecordDate, RecordType, sum(HowMany) AS Num
FROM tblAddress
WHERE RecordDate Between NZ([forms]![frmPrint]![StartDate],#1/1/2000#) And
NZ([forms]![frmPrint]![EndDate],#12/31/2999#)
GROUP BY RecordDate, RecordType;
If I remove the grouping here and rely on the report to sort/group, the same
thing happens, existing records group and newly added records don't group
(i.e. they are printed one detail record at a time).
Anyone got any clues before I go crazy?
certain point, then it returns ungrouped data. This has me completely
bewildered. At
some point I removed the primary key from this table (for unrelated reasons)
and I believe that is what triggered the problem. I have already tried
recreating the table and copying in all the data. This fixed the problem for
existing records but all newly added records again will not group.
This is the query that feeds the report:
SELECT RecordDate, RecordType, sum(HowMany) AS Num
FROM tblAddress
WHERE RecordDate Between NZ([forms]![frmPrint]![StartDate],#1/1/2000#) And
NZ([forms]![frmPrint]![EndDate],#12/31/2999#)
GROUP BY RecordDate, RecordType;
If I remove the grouping here and rely on the report to sort/group, the same
thing happens, existing records group and newly added records don't group
(i.e. they are printed one detail record at a time).
Anyone got any clues before I go crazy?