Divide a table of records into 3 fairly even groups

G

Gina

Gina wrote:
I need to divide a table of approximately 1200 records into three fairly even
groups. So far, I have created an autonum field and get the total and on a
calculator divide by 3 and then create 3 identical queries. In one I put
'400' in another 'Between 400 And 800' and in the last one '>800'.

However, each day this table's total changes and thus these subsequent
totals change.

Is there a way to automate this.

Thank you.
 
D

Douglas J. Steele

Try creating a query that has a computed field Remainder: [AutonumberFIeld]
Mod 3

You can then have 3 queries based on that which takes those with Remainder =
0, Remainder = 1 and Remainder = 2.
 
G

Gina

Thanks for your reponse. I am not sure what you mean by 'mod'. Although, it
sounds like just what I'm looking for. Please explain.

Thanks
--
Gina


Douglas J. Steele said:
Try creating a query that has a computed field Remainder: [AutonumberFIeld]
Mod 3

You can then have 3 queries based on that which takes those with Remainder =
0, Remainder = 1 and Remainder = 2.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Gina said:
Gina wrote:
I need to divide a table of approximately 1200 records into three fairly
even
groups. So far, I have created an autonum field and get the total and on
a
calculator divide by 3 and then create 3 identical queries. In one I put
'400' in another 'Between 400 And 800' and in the last one '>800'.

However, each day this table's total changes and thus these subsequent
totals change.

Is there a way to automate this.

Thank you.
 
A

Al Camp

Gina,
You should to stay with your original 5/9 post on this question.
Please see James Fortune's response to your reply of today (5/12)... on that original
thread.
Starting a duplicate thread will only lead to confusion, and duplicated effort...

Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 
K

KARL DEWEY

Add an output field in the design grid using the autonumber field like this --
Remainder: [YourAutoNumberField] Mod 3

For the first batch use criteria of 0 (zero). The second batch use 1.

Gina said:
Thanks for your reponse. I am not sure what you mean by 'mod'. Although, it
sounds like just what I'm looking for. Please explain.

Thanks
--
Gina


Douglas J. Steele said:
Try creating a query that has a computed field Remainder: [AutonumberFIeld]
Mod 3

You can then have 3 queries based on that which takes those with Remainder =
0, Remainder = 1 and Remainder = 2.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Gina said:
Gina wrote:
I need to divide a table of approximately 1200 records into three fairly
even
groups. So far, I have created an autonum field and get the total and on
a
calculator divide by 3 and then create 3 identical queries. In one I put
'400' in another 'Between 400 And 800' and in the last one '>800'.

However, each day this table's total changes and thus these subsequent
totals change.

Is there a way to automate this.

Thank you.
 
G

Gina

Al,

Using this site is new to me. I thought that if you weren't on the first
few pages, that you would soon be forgotten. I did go back and check on
James response. As I am rec'g alternate solutions, I am going to see which
is the best fit. I will respond to James and let him know that I have
resubmitted my question here so that he can also see what others have
suggested. The last thing I want is for anyone to being doing duplicate
work. Happens to be one of my own pet peeves.

Thanks, and sorry for any inconvenience.
 
J

James A. Fortune

Gina said:
Al,

Using this site is new to me. I thought that if you weren't on the first
few pages, that you would soon be forgotten. I did go back and check on
James response. As I am rec'g alternate solutions, I am going to see which
is the best fit. I will respond to James and let him know that I have
resubmitted my question here so that he can also see what others have
suggested. The last thing I want is for anyone to being doing duplicate
work. Happens to be one of my own pet peeves.

Thanks, and sorry for any inconvenience.

I saw the new post. One thing to consider is that the solution using
the Mod function will break up the table with every third row going into
a new table. You need to decide whether that's desirable or not.
Douglas' solution and mine should both work without much effort. Plus,
we're standing by, eager to assist. If you don't need or want to keep
the records contiguous then use Douglas' solution since it is easier to
implement.

James A. Fortune
(e-mail address removed)
 
G

Gina

James,

I ended up using the MOD 3, works wonderfully for this project.

I learn something new everyday.

I want to thank you all for your time and input.
 

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