Selecting every 3rd row for copying 
Author Message
 Selecting every 3rd row for copying

I was wondering if there is a way in access to select
every 3rd entry or 4th entry in a datapage to copy and
creat a new datapage with...basically I have a large
database and need to mail something out...however we don't
want to mail all of them only a third or so, so I was
wondering if there is any way to do this without just
selecting the 1st 1/3 or second or so on...I would like to
make it somewhat random...if anyone could please help me
out with this it would be very appreciated!!!
Stacey


Mon, 15 Aug 2005 21:09:59 GMT  
 Selecting every 3rd row for copying
Stacey

One solution might be to use MOD.

If you have a field that is a unique, numeric identifier (i.e. Autonumber
field) then in the WHERE clause, include a condition like:

   WHERE  ( ( Table.AutoNumberField mod 3 ) = 0 )

For example:

SELECT Table1.AutoNum, Table1.FirstName
FROM Table1
WHERE ( ( Table1.AutoNum mod 3 ) = 0 )

HTH
--
Rob
www.fmsinc.com
www.fmsinc.com/consulting


Quote:
> I was wondering if there is a way in access to select
> every 3rd entry or 4th entry in a datapage to copy and
> creat a new datapage with...basically I have a large
> database and need to mail something out...however we don't
> want to mail all of them only a third or so, so I was
> wondering if there is any way to do this without just
> selecting the 1st 1/3 or second or so on...I would like to
> make it somewhat random...if anyone could please help me
> out with this it would be very appreciated!!!
> Stacey



Mon, 15 Aug 2005 22:47:32 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Delete every 2nd and 3rd row- VBA

2. Deleting every 2nd and 3rd row

3. Sorting every 3rd row

4. Selecting every 3rd record

5. Copy every 3rd cell in a column?

6. How to select every 100 rows until worksheet end

7. Selecting every other cell (row) in a column

8. Selecting every 7th Record (row)

9. Select Every Nth Row??

10. Selecting every other row


 
Powered by phpBB® Forum Software © phpBB Group