June7, thanks for your prompt reply.
I've provided a chart below that gives the idea of what the query results would look like. I've also added a column on the right. Let me say a little about the chart.
Notice that --
1) The records are sorted by Num1, Num2, Num3, Text1.
2) This puts the records into groups. In each group, Num1, Num2 and Num3 are the same. For example, in the first group, these fields have the values 2,34,7 for all records.
3) A calculated field, GoGroup numbers these groups.
4) I've added a field on the right, GoGroupCount, which would be another calculated field that gives the number of records in the group to which each record belongs. (More on this below.)
5) Num2 and Num3 can be null. Num2 can only be null if Num3 is null.
After the table, I'll say where I'm going with all this.
Code:
GoGroup Num1 Num2 Num3 Text1 Text2 GoGroupCount
1 2 34 7 cat hello 2
1 2 34 7 dog hello 2
2 5 64 8 bus hello 1
3 23 24 pony hello 1
4 23 24 5 bear hello 4
4 23 24 5 car hello 4
4 23 24 5 doll hello 4
4 23 24 5 king hello 4
5 23 24 7 arm hello 1
6 43 leg hello 1
7 43 1 9 cats hello 2
7 43 1 9 horse hello 2
8 64 17 23 goat hello 2
8 64 17 23 shop hello 2
9 64 17 81 kids hello 1
Okay, here's where I'm going with this.
1) I'd like to be able to take the records from the query, group by group -- one group at a time -- and do something with them. This must be done manually, and something different must be done to each group, depending on the values of Num1, Num2 and Num3. But this thing can be done simultaneously to all the records in a group, which is why it's an advantage to group them.
2) To simplify the process of taking the records for the manual process, and avoid mistakes, it's important that I be able to see just one group at a time in a query -- not this query, but another one down the road, that's based on this.
3) I want the GoGroup field as a handle for each group. Actually, in another query, I'd just call up each group in turn by its GoGroup value. This way, I'd just have to enter the value for one field (GoGroup), rather than three (Num1, Num2, Num3).
4) It would also be an advantage to prioritize the records, taking the largest groups first. That's why I added the field on the right, GoGroupCount. Maybe it shouldn't be a field in THIS query. But if, in another query, I could sort the groups by GoGroupCount and in that way see the GoGroup field sorted with the biggest groups first, I could then -- in yet another query, perhaps -- call up the groups by their GoGroup value, one group at a time and the biggest groups first -- and then process each group as I need to.
That's what I'm aiming for. Can you help me, June7 who works on Jan1?
Thanks!