How do I populate a query with every fifth record?

G

Guest

I am working in Access 2002. I want to create a query that will select every
fifth record from a table. I want to use this query to populate a list box.
I understand the "Sort" part of this process. What I can't figure out is
what to put in the "Criteria" box when I am creating the query in Design mode.

Thanks.

Michael Heiter
 
J

John Vinson

I am working in Access 2002. I want to create a query that will select every
fifth record from a table. I want to use this query to populate a list box.
I understand the "Sort" part of this process. What I can't figure out is
what to put in the "Criteria" box when I am creating the query in Design mode.

Thanks.

Michael Heiter

Since tables have no record numbers, the term "every fifth record of a
table" is not meaningful - it's like saying every fifth rock in the
wheelbarrow. What sort criteria are you using? What are the actual
contents of the table, and what do you want to see?

John W. Vinson[MVP]
 
P

peregenem

John said:
Since tables have no record numbers, the term "every fifth record of a
table" is not meaningful - it's like saying every fifth rock in the
wheelbarrow.

Since tables have a physical order on disk (the effect of having a
non-maintained clustered index on the PRIMARY KEY) it would be more
like saying the rock with the fifth highest PK value I assigned it when
I put it into the wheelbarrow or, in absence of a PK or a file compact,
the fifth rock I put into the wheelbarrow.
 

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