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!

Finding the lastest date among several records

Status
Not open for further replies.

Jackie

MIS
Feb 9, 2000
148
US
I have a table that stores SSN and date.&nbsp;&nbsp;Multiple records exist for an SSN. For each SSN, I want to select the record with the lastest date.&nbsp;&nbsp;I suspect this is a situation for an array, but am not fond of arrays.&nbsp;&nbsp;Any thoughts (even if it means using an array) would be appreciated.<br><br>Thanks.
 
I guees your data is in a table right?<br>Use a query.<br>Add the SSN number and type this in the criteria box<br>[Enter Social Security #] <br>&nbsp;Brackets and all.<br>Then add the Date field and any other fields you want.<br>In the Date field click in the Sort column and pick Descending.<br><br>Run your query (click RED Exclamation mark) in menu bar.<br>The key in a valid SSN number and press enter. The latest date will be on top.<br><br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
If you only want to see the last date record then make the query a Totals query, and set the SS field to Group By and the Date field to Max.
 
Since this data is for a report and all ssn's need to be included in the report, a parameter query won't work.&nbsp;&nbsp;The Totals query approach might be the answer.&nbsp;&nbsp;Thanks for the responses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top