Results 1 to 3 of 3
  1. #1
    vland is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2013
    Posts
    2

    Returning 2 Values Based On 1 Maximum Value, Access 2010

    I have one table which stores the following information: [DateTime], [Flow] (number), and [Chemical Concentration] (number).



    I need to find the maximum hourly flow for the day which is a no brainer. I group on "YYMMDDHH" and set the query result to MAX. My problem is this, at the maximum flow for the hour, I also have to record the Chemical Concentration. If I try and do this in the same query, the only choices I have are Max, Min, First, Last, etc. for the Chemical Concentration. I've tried concatenation followed by sorting but I'm getting nowhere.

    Any thoughts would be welcome.

    Vern

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You can do this using a series of two queries.
    First, create the Aggregate query like you have that returns the Max value you are looking for.
    Then create a new query, linking this Aggregate Query back to the Original table on whatever ID field you have (if any) AND the Flow field.
    Then return any fields you want.

  3. #3
    vland is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2013
    Posts
    2

    Thanks!

    I appreciate the help.

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

Similar Threads

  1. Query not returning all values
    By whitelexi in forum Queries
    Replies: 12
    Last Post: 09-06-2014, 11:40 PM
  2. Replies: 4
    Last Post: 06-12-2014, 07:01 AM
  3. Limits for maximum values of each field
    By alfaomegas in forum Queries
    Replies: 8
    Last Post: 09-20-2013, 07:40 AM
  4. Maximum values from a date range
    By FatLane in forum Queries
    Replies: 3
    Last Post: 07-10-2012, 05:09 PM
  5. Replies: 1
    Last Post: 11-18-2011, 08:12 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