Query Sort

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there.
In a query that I am running I need the first line of the results.
For example:
I have a table of products. Each product is given an id (2006-001 ..for
example) and a date added entry(when the product is added, the date is
entered and a new id(increments of 1..so 2006-002, 2006-003 ..and so on)
I need to be able to query the last added id. All I want is the last added
ID, and not a list of all the id's in descending order.

Is this possible?

Thanks.
_State
 
If you want to use it in a query, sort the query in descending order and use
the TOP 1 predicate.

Or, you can use the DMax in VBA

=DMax("[productid]", "ProductTable")
 
Back
Top