Duane said:
There have been several postings in these groups about creating a
"ranking" value that numbers records 1- whatever. If you integer divide
the ranking value by 25, you will get groups of 25.
Group25: [RankValue]\25
For example (but I used 5 instead of 25 to save space in this message),
suppose you use field [MyTable_ID] as the unique identifier in the
following Table.
[MyTable] Table Datasheet View:
MyTable_ID Name
----------- ----------
-1281812111 Hillary
-1175407083 John
-819535950 Samuel
-32683379 Laura
100990686 Barbara
999344330 Bill
1229930059 James
1498042084 George
1834762503 George
1889883440 Mary
2053355580 John
2053355580 John
Then you can calculate group numbers using the following Query (but change
the 5 in the third line to 25)...
[Q_SerialNumbers] SQL:
SELECT MyTable.MyTable_ID, MyTable.Name,
Count(MT2.MyTable_ID) AS Num,
1+([Num]-1)\5 AS [Group]
FROM MyTable, MyTable AS MT2
WHERE (((MT2.MyTable_ID)<=[MyTable].[MyTable_ID]))
GROUP BY MyTable.MyTable_ID, MyTable.Name
ORDER BY Count(MT2.MyTable_ID);
[Q_SerialNumbers] Query Datasheet View:
MyTable_ID Name Num Group
----------- -------- ------ -----
-1281812111 Hillary 1 1
-1175407083 John 2 1
-819535950 Samuel 3 1
-32683379 Laura 4 1
100990686 Barbara 5 1
999344330 Bill 6 2
1229930059 James 7 2
1498042084 George 8 2
1834762503 George 9 2
1889883440 Mary 10 2
2053355580 John 11 3
... and using these calculated group numbers you can display the results
using another Query.
[Q_Groups] SQL:
SELECT Q_SerialNumbers.Group, Q_SerialNumbers.Name,
Q_SerialNumbers.MyTable_ID
FROM Q_SerialNumbers
ORDER BY Q_SerialNumbers.Group, Q_SerialNumbers.Name;
[Q_Groups] Query Datasheet View:
Group Name MyTable_ID
----- -------- -----------
1 Barbara 100990686
1 Hillary -1281812111
1 John -1175407083
1 Laura -32683379
1 Samuel -819535950
2 Bill 999344330
2 George 1834762503
2 George 1498042084
2 James 1229930059
2 Mary 1889883440
3 John 2053355580
However, like BruceM, I think that this seems like a strange thing to do
to a list. You might want to consider sorting them by date, or
alphabetically, before assigning records to groups. Your identifier
(including the date or whatever) would still need to be unique.