Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Query Problem Access97

    I have a table with fields for Name and Date and multiple records containing some of the same Names and Dates. I need a query that selects the first occurrence of each name with the latest date for that name. I tried using the UNIQUE RECORD property, but it selects based on the unique occurrence of the Name AND Date so it selects every record. I just want to select based on the unique occurrence of the Name. With the corresponding dates in ascending order the first occurrence of Name should also select the one with the latest date.

    How do I do this?

  2. #2
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Youngstown, Ohio, USA
    Posts
    705
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Query Problem Access97

    Use the Totals function, and set the Name to "Group By" and Date by "Max". Each Name will be listed once, and if there are multiple occurrences of the Name, only the one with the most recent Date will be selected.

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Query Problem Access97

    Thanks Dave,

    That did it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •