Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query question

Status
Not open for further replies.

rhonda11

Technical User
Nov 4, 2002
96
US
Please help. I'm trying to query a table that will give me the most updated data in a record. For example, a record has multiple updates, the only data I want is the most recent update. In each updates, it has a date field. How can I create a query that'll pull only the recent update instead of all updates in one record.

I appreciate any help...thanks in advance.
 
There are 2 possibilities:

1. most Access DBs tables have a field that tracks a ID number using an AutoNumber field. This number is always unique, and if not set to random, always increments by "1" ... so if you do a search and ORDER BY IDfield DESC and set MAXROWS to "1" then the data you pull will be the last one entered.

2. or do the same thing as above, only sort by DATE field DESC and set MAXROWS to "1" - this will give you the last entry for that date.
 
Thanks for your help, however, where can I set the maxrow? Would that be in the Expression builder from select query from the criteria row? If so, I would choose the "Max" function?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top