Results 1 to 4 of 4
  1. #1
    thecuteonexoxo's Avatar
    thecuteonexoxo is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    2

    Question Querie to Find Maximum Value


    I'm using Access 2010 and I have a table [see below] ... What I need is a query that will give me back the acct. no & the most current(or max) date for that account.
    For Example I would need the query to come back with acct No. 1 & 6/25/2012 since thats the most current date.
    I've tried Dlookup and max functions in access but since you can't have aggregate functions in criteria i'm at a loss and currently doing this ->

    acct No Load Date
    1 5/1/2012
    1 5/25/2012
    1 6/25/2012
    2 5/2/2012
    2 5/25/2012
    2 6/6/2012
    4 5/2/2012
    4 6/6/2012
    5 5/26/2012
    5 6/2/2012
    5 6/7/2012
    25 6/26/2012
    33 5/1/2012
    33 5/25/2012
    54 5/31/2012
    62 6/25/2012
    62 7/1/2012
    98 7/5/2012
    98 7/24/2012

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You will need an aggregate query that groups by acct no

    SELECT [Acct No], Max([Load Date]) as MostRecentLoad
    FROM yourtablename
    GROUP BY [Acct No]

  3. #3
    thecuteonexoxo's Avatar
    thecuteonexoxo is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    2
    Works perfectly. Thank you so much!

  4. #4
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You're welcome.

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

Similar Threads

  1. Need a querie that updates.
    By imlost2 in forum Queries
    Replies: 1
    Last Post: 08-20-2011, 09:06 AM
  2. Add A Querie to the Report
    By BowBeforeMeMySlave in forum Reports
    Replies: 3
    Last Post: 02-10-2011, 09:27 AM
  3. Number querie
    By Rigsby in forum Queries
    Replies: 3
    Last Post: 02-08-2011, 06:41 AM
  4. Find Maximum Value of a Field and Add 1
    By jhillbrown in forum Forms
    Replies: 3
    Last Post: 03-11-2010, 11:42 AM
  5. querie problem
    By TIMT in forum Queries
    Replies: 2
    Last Post: 05-31-2009, 10:12 AM

Tags for this Thread

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