Selecting Specific Rows to Display in a Query

This tip explains how to display every 5th record in a table.  For example; you have a table with many records. The first field in each of the records is where you number each record. Each record has a unique number. You wish to build a query which would only return records with these numbers: 1, 6, 11, 16, 21, 26, 31, and so on (every 5th record).

To do this:

In the criteria row of the query for the field that has the record numbers, type the following:

[FieldName] Mod 5 = 1

This will return all the fields that when divided by 5 have a remainder of 1.

NOTE: Change FieldName to the name of your field.

 

Do you like this tip? Subscribe to my free weekly Newsletter to receive tips weekly via email. Click Here to subscribe.


Share this page: