When you say "[FieldYouAreGroupingBy] what does this mean?
Yourtable is the current table in which it pulls, so it'll be
Qrywimssum (assuming this is the table in the query where the new
column would pull of of right?)
ItemCount: DCount( "WIMS_SUB_VEND", Qrywimssum ,
"[FieldYouAreGroupingBy]=" & [FieldYouAreGroupingBy] )
here is current SQL if that'll help.
SELECT Qrywimssum.DST_CNTR, Qrywimssum.VEND_NUM,
Qrywimssum.WIMS_SUB_VEND, Qrywimssum.SUB_VEND_DESC,
Qrywimssum.SHIPPING_POINT, Qrywimssum.LAST_FM_DATE
FROM Qrywimssum
GROUP BY Qrywimssum.DST_CNTR, Qrywimssum.VEND_NUM,
Qrywimssum.WIMS_SUB_VEND, Qrywimssum.SUB_VEND_DESC,
Qrywimssum.SHIPPING_POINT, Qrywimssum.LAST_FM_DATE
HAVING (((Qrywimssum.VEND_NUM)=[Vendor Number]) AND
((Qrywimssum.WIMS_SUB_VEND)>"1"))
ORDER BY Qrywimssum.WIMS_SUB_VEND DESC;
Hi Ryan
Add a calculated field to your report query like this:
ItemCount: DCount( "WIMS_SUB_VEND", "YourTable",
"[FieldYouAreGroupingBy]=" & [FieldYouAreGroupingBy] )
Then add the field ItemCount to your report's sorting/grouping list
*before*
the field that has the group header/footer and with a sort order
"Descending".
--
Good Luck
Graham Mandeno [Access MVP]
Auckland, New Zealand
I have a report where at the footer I have: =Count([WIMS_SUB_VEND])
Is there away to have the report start with the highest number of
[WIMS_SUB_VEND] first like
item 1 has 108 items
item 2 has 104 items
item 3 has 68 items
etc