title: SQL query search by ID and get another attribute of the record
body: <p>I'm working on a DB where I need to search MAX(ID), where ID is an autonumber, (basically the most recent record/last record) and then when found I want to get the receipt number. e.g.</p>
  
  <p>receipt table</p>
  
  <pre><code>ID         DATE        Number
  2          ###          1423
  3          ###          1452
  4          ###          1401
  </code></pre>
  
  <p>I'm currently retrieving Max(Number) but due to program requirement, most recent is not always the highest. So I want to retrieve the highest ID value then get the value of Number to increment. I tried nested queries but no results. Although I'm familiar with VBA, I'm not as good with complex queries and optimization.</p>