This query will divide your records into approximately 9 even groups
SELECT WT.Name, WT.End_Wt,
Int((Val(DCount("Name","WT","Format(End_Wt,'0000') & [Name]<=""" &
Format([End_Wt],'0000') & [Name] & """")-1)/DCount("*","WT"))*9) AS
WtClassGrp
FROM WT
ORDER BY Int((Val(DCount("Name","WT","Format(End_Wt,'0000') & [Name]<="""
&
Format([End_Wt],'0000') & [Name] & """")-1)/DCount("*","WT"))*9);
BTW: name is not a good name for a field since every object has a name
property.
--
Duane Hookom
MS Access MVP
--
Mal said:
Sorry I forgot to put in the Table name. The Table name is WT, The
field
names are very simple -- Name, Start _Wt, End _Wt But for this report I
only
care to sort by end weight even though Start weight will be listed
:
OK, so we now know that the major groups are by weight. What is the
rhyme
or
reason on the classes? There has to be some stored value to create the
classes.
It would also help to know the table and field names.
--
Duane Hookom
MS Access MVP
--
First off thank you for ressponding. I will try and explain.
My Table has names of people and weights
What I was asked to do is sort the table by weights and then div
into
groups
of light weight, middle weight and heavy weight. Then within each
weight
group I am to div those divisions into classes with a even number of
people
in each class in each weight division.
Does This Help?
Thank You
Mal
:
Is there any rhyme or reason to the groups and subgroups or are
they
random?
--
Duane Hookom
MS Access MVP
--
I hope this is the right group --- My problem is this ---- I need
to
take
the
information in a table and div it into 3 groups and then I need
to
sort
those
groups into 3 as subgroups.
I really am at a loss and the boss wants it yesterday.
Thank You
For any help