how do i select the most current record using effective date in ac

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

Guest

I need to select the most recent record out of duplicate records using the
effective date - how do I do that in Access using a Query? Thanks. Marianne
 
Without more details, here is a generic query:

SELECT Tablename.*
FROM Tablename
WHERE Tablename.DateFieldName =
(SELECT Max(T.DateFieldName)
FROM Tablename AS T);
 
I need to select the most recent record out of duplicate records using the
effective date - how do I do that in Access using a Query? Thanks. Marianne

Use a Subquery: as a criterion on EffectiveDate use something like

=(SELECT Max([EffectiveDate]) FROM tablename AS X WHERE X.fieldname =
tablename.fieldname)

where fieldname identifies the group of duplicates amongst which you
wish to find the most recent.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top