Grouping And Sub Grouping

G

Guest

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
 
G

Guest

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
 
D

Duane Hookom

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.
 
G

Guest

The boss says there are to many in each weight class to handle as a group so
he wants each weight class divided evenly. He wants to have somewhere between
7 or 10 in a class, but he does not want to have the last class only have 3
in it because thats how the math worked out. Soooo he said find a way that
will take the total number of people in a group starting with the heavest in
that group and divide them evenly no matter how many classes there are as
long as there is somewhere between 7 to 10 in a class. Do I need more info in
my table?
Is this even possible?
Thank You
Mallory
 
G

Guest

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
 
D

Duane Hookom

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.
 
G

Guest

This is really close, Thank You.
I have 1 question In using your query I am able to get 3 groups now is it
possible to form the classes within each group or am I not using your code
right?
Thank You very much for your time working with a novice.

PS Sorry about the posting in the query section -- this is new to me

Mallory

Duane Hookom said:
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
 
D

Duane Hookom

I thought you would use the 9 groups and the similar logic to group into 3
major groups. You can take the returned WtClassGrp\3 to get 0,1,or 2 for
major groups.

--
Duane Hookom
MS Access MVP
--

Mal said:
This is really close, Thank You.
I have 1 question In using your query I am able to get 3 groups now is it
possible to form the classes within each group or am I not using your code
right?
Thank You very much for your time working with a novice.

PS Sorry about the posting in the query section -- this is new to me

Mallory

Duane Hookom said:
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
 

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