find latest record with query

pablavo

Registered User.
Local time
Today, 09:16
Joined
Jun 28, 2007
Messages
189
I'm fairly new to SQL and have a problem finding the latest record.

Lets say I have a development project that has many disbursal payments to be sent. I want to find the latest disbursal record created for that one project instead of having all of the disbursal records show on the query.

I'm trying to work out how to do this in a query but haven't got a clue where to start.

Please, if anyone can help I'd be very grateful!:D
 
Use the query builder to select the records for the project you want and sort them in descending date order. Use the TOP 1 to pick out the latest one. See Access help for more info.
 
Still not sure

Thanks for the reply Rabbie!

Would that still work in the following senario?

If I want to use a query for a report that would show all Projects ("tblProject" residing in the parent table) and only the last added disbursal records (tblDisbursal" indirect table relationship) for all the Projects. Would that still be viable with the TOP predicate?

I'm not really sure how this would be done. i've had a look at some articles but still a little confused as to how this would be done. :confused:
 

Users who are viewing this thread

Back
Top Bottom