Results 1 to 3 of 3
  1. #1
    Only4Access is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    38

    Arrow MAX Date Records, But No Duplicates

    Hello Forum,

    Thank you for all the support have been provided from everyone. Now i am stuck on the SELECT query to return MAX record.

    I have been playing with this article to return MAX date record with all record from original table



    http://www.techonthenet.com/access/q...uery2_2007.php

    The problem is, If i have a record with more than one same MAX date, it displays that records n times.

    Please see the attached sample DB. If you run qryMAxDetails, you can see Text2 is duplicated with 1/2/2015 1:30:00 AM. I only want to return one time, REGARDLESS of other fields. As you can see in the query criteria set to AccID=1 with MAX date. I only want to return one record for Text2. EmpID or SiteID is don't matter. If we can display Record 2 or 3 no problem.

    I hope you all understand my issue. thank you for your valuable time.
    Attached Files Attached Files

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    you have to run two consecutive 'max' queries to get what you want, in this case I took the max ID (most recent record).

    See here:
    Sample.zip

  3. #3
    Only4Access is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    38
    wowwwww. Thank you rpeare. Works like a charm! I should have been learn more about Group in queries

    Thanks a lot rpeare Thanks a lot.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 03-22-2014, 04:32 PM
  2. Duplicates in records
    By jamescrowe in forum Access
    Replies: 3
    Last Post: 01-28-2014, 04:46 PM
  3. Replies: 4
    Last Post: 07-15-2013, 12:30 PM
  4. Duplicates sets of records on conditon
    By rkalapura in forum Access
    Replies: 1
    Last Post: 12-16-2012, 07:06 PM
  5. Count unique records - no duplicates
    By Kevo in forum Queries
    Replies: 4
    Last Post: 08-15-2011, 01:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums