G
Guest
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 is driving me crazy. 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. Does
anyone have any idea what causes this and what I can do to fix it once and
for all?
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;
certain point, then it returns ungrouped data. This is driving me crazy. 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. Does
anyone have any idea what causes this and what I can do to fix it once and
for all?
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;