Help! Need to query last 3 records for rpt!

dakcg

Registered User.
Local time
Today, 04:29
Joined
Aug 24, 2001
Messages
88
Hi, I have recently put on the Access cap again after a year away, and Boy, how fast you forget!

Anyway, I am in the last steps of a simple database, and I am caught on what seems like a simple thing:

It is a simple Invoice/Payment DB. What I need is the last 3 payments of the Customer to show up on the report, and I cannot figure it out. The Last record I can get, all the records I can get, but is there a way to take out a specified amount of records?

Help!

Thanks
 
Sort the query in descending order and select Top 3 e.g.

SELECT TOP 3 Field1, Field2, ....
From tableName
Where Customer=xxx
ORDER BY Fieldx Desc
 

Users who are viewing this thread

Back
Top Bottom