Select Certain Records In Database

G

Guest

I have a database of 600,000 names, addresses, etc. (There are nine fields
(columns), field1 is the name, field2 is the address, etc.) This is is not
in alphabetic order, nor does it need to be. I need to select every FIFTH
record and do not know how to do this. I am not an Access guru and am not
familiar with programming. Once every fifth record is selected, I need that
information to be put into another database so it can be saved separately.
HELP!!!!
 
G

Guest

This is is not
in alphabetic order, nor does it need to be. I need to select every FIFTH
record and do not know how to do this.

What is the use of that. Is this random selection?
The results will change willst sorting the records.

Please be more more specific.
 
G

Guest

In a sense it is a "very" random selection since the list is not in alpha
order. I am preparing a master list, which by law, I have to select every
fifth record. This list will then be used for other purposes of mail merge,
etc.
 
J

John Spencer (MVP)

Paula,

To select every fifth record, the records must be in some kind of order. You
could just add an autonumber field to the table and accept its order and then
select every fifth record using modulo function.


SELECT *
FROM YourTableName
WHERE AutoNumberField Mod 5 = 1

Another way would be to add a field to your table (true/false) and then use vba
to step through the recordset and mark every fifth record true.

IF you decide to use vba function and need help - please post back and when you
do let us know what version of Access you are using (97, 2000, etc)
 

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