Duplicate and Last Record

D

Dan

I have a short range of numbers that gets recycled. I am trying to create a
query that returns a result based on the last instance of that number to see
if it is available:

Name Number Term
Bob 1111 True (check box)
Kevin 1111 False (Check Box)

the return result should omit 1111, Not quite sure how to go about it.
 
M

Michel Walsh

Hi,

If you have a date_time field

SELECT *
FROM myTable
WHERE dateTimeField=(SELECT MAX(dateTimeField)
FROM myTable)

If you have "groups", rather than just one record to return (like, for each
book in a library, who is the last borrower) you can use one of the method
in http://www.mvps.org/access/queries/qry0020.htm.



Hoping it may help,
Vanderghast, Access MVP
 
Top