What type of formula can i use to get every 40 record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database that has to many records. To make it easier on me i would
like to view every 40 record. What type of a formula can i use for it to be
devided in groups of 40
 
I have a database that has to many records. To make it easier on me i would
like to view every 40 record. What type of a formula can i use for it to be
devided in groups of 40

I'm not sure what you mean, Jessica. Do you want a Query that returns
every 40th record? or do you want to see records in blocks of 40?

I'm guessing the latter. If so, don't use table datasheets to look at
your data: tables are for data storage, not for editing or searching!
Instead, create a Form to view the data. You can set the Default View
of the form to "Continuous Forms" and set the size of the form to view
40 records at once (if they'll fit on your screen).


John W. Vinson[MVP]
 
I want a query that returns every 40th record and i would also like to try
viewing then in blocks of 40. What is the best way step by step to do both of
this functions.
 
Jessica,

What does the table look like? You need some way of identifying your 40th,
80th etc record.
 
I want a query that returns every 40th record and i would also like to try
viewing then in blocks of 40. What is the best way step by step to do both of
this functions.

As Chaim says, you need something *in* the table to identify the
sequence. A table has no record numbers, and no meaningful order - it
should be considered an unordered "heap" of data. If you had a
wheelbarrow full of potatoes, what is the meaning of "every fortieth
potato"?

What is stored in your table? Do you have a numeric ID field, or some
other way of identifying blocks of 40?

John W. Vinson[MVP]
 
I have an iD field, what can i do next

John Vinson said:
As Chaim says, you need something *in* the table to identify the
sequence. A table has no record numbers, and no meaningful order - it
should be considered an unordered "heap" of data. If you had a
wheelbarrow full of potatoes, what is the meaning of "every fortieth
potato"?

What is stored in your table? Do you have a numeric ID field, or some
other way of identifying blocks of 40?

John W. Vinson[MVP]
 
Jessica,

If the ID field is sequential, you can use the Mod operator as in:
select * from YourTable where ID mod 40 = 0;

This will get you every 40th record assuming that ID starts from 1 and is
sequential.

Good Luck!
 
Back
Top