Last n Records

  • Thread starter Thread starter Rayh
  • Start date Start date
R

Rayh

Hi,
How do I extract the last n records for each member from a table.
Thanking you in anticipation.
Rayh
 
You need to define what is meant by "first" and "last" based on some
criterion (for example, the records with the latest dates). You define this
order in a query, then use the TOP or BOTTOM options in the query's SQL
statement. See Help for more info; post back if you have additional
questions or can show specific info that would help us provide a suggested
solution.
 
Hi,
How do I extract the last n records for each member from a table.

Unless you have SOMETHING in the table to determine which record is
"last", there is no way to do this. A Table is an unordered "bucket"
of data - there is no usable "last record" or "first record", and
there are no "record numbers".

If you have a timestamp field defaulting to Now(), or a strictly
increasing field such as a sequential Autonumber or a custom Counter,
you can create a Query based on the table sorting by this field. Set
that query's Top Values property to the number of records desired.
 
Back
Top