Query All records except latest

D

deb

Access 2003

I need to limit my query to ALL RECORDS EXCEPT the most current record.

Any ideas on how to do this
 
D

Daryl S

Deb -

It will look something like this, assuming no more than one record per date
per key field. You can adjust to use date/time if that is needed. It
depends on what makes your records unique. Try something like this,
substituting your table and fieldnames...

Select myKeyfield, field1, field2, field3, myDate
FROM myTable
Where myDate < (Select max(myDate) from myTable AS T2 WHERE T2.myKeyfield =
myTable.myKeyfield)
 
J

John W. Vinson

Access 2003

I need to limit my query to ALL RECORDS EXCEPT the most current record.

Any ideas on how to do this

Access does not know or care which is "the most current" record. You'll have
to define the criteria for that yourself, based on the structure of the table
and the nature of the data. Do you have a sequential ID, or a date/time stamp,
or something else which would let you identify the "current" record?
 

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