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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Eliminate records with older dates but same value for other field

Status
Not open for further replies.

Tarnish

Technical User
Nov 13, 2006
221
US
Hi all,

I'm rusty with Access but if I could just get an idea how to proceed I think I could figure it back out.

I have a table of data I've imported from an excel spreadsheet. There is no primary key (other than one I added during the import that I don't think helps here).

The table is basically a transactions table. One column contains item codes and another column contains transaction dates. So for any given item code, there may be multiple records with different transaction dates. What I need to end up with is a list of unique item codes (read: one record for each item code) with the most recent transaction date. In other words, I need to eliminate all but one record for each item code based on the transaction date.

Is this something that can be done using dmax or something like that? If so, how do I set it up to take the most recent date for a given item code? I could cut the query columns down to those two fields (item code and most recent transaction date), and then apply distinct to it...

Thanks for any direction.

T
 
I think I got it now. Sorry for the wasted bandwidth.

T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top