grouping records in a report

W

wendigo

I need to be able to take a group of records, get the number of people per
group (from the user), and split the group of records across these new groups.


Ie I have 200 records and I want them to be placed into groups of 15
(randomly).

Is this something that I can do inside of the report query, or does it have
to be done in the "code behind"?

thanks for any help you can give me!
 
K

KARL DEWEY

Using an autonumber field (Prim) and your other fields, they must be listed
individually and in the Group, By this query will divide the record set by
number entered at prompt. You can add the Rank field as a group in the
report.

SELECT a.Column1, (COUNT(*)\((DCount("Prim","YourTable-4")\[Enter number to
divide])+1))+1 AS rank
FROM [YourTable-4] AS a LEFT JOIN [YourTable-4] AS b ON a.Prim>=b.Prim
GROUP BY a.Column1;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top