Results 1 to 2 of 2
  1. #1
    LunaticFringe82 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2011
    Posts
    1

    Querying the "minimum value" record

    I'm developing a query using baseball statistics where I'm trying to isolate the first batter in each inning...



    So I want to see all records for team, date, inning where the outs=0 and there are no runners on base (ROBSit=0). However, there is one other loophole that I need to close:

    Let's say the first batter of the inning hits a home run. For the inning in question, there will be TWO records where outs=0 and ROBSit=0 and I need to isolate the one that occurred FIRST.

    My records have a sequence number (Yr#). So let's say the first batter (Yr# 1000) homered. Then the next batter (Yr# 1001) struck out. I do not want the strike out to be part of my dataset.

    How do I query Yr# to display only the MINIMUM value given team, date, inning, outs=0, and ROBSIt=0?

    Thanks for any help!!

    Gary

  2. #2
    blue4512 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    26
    Run a query that calculates totals* and for the total column select "min"
    *on the design tab select the totals option and an additional line will be added to your query where you can select Min for the yr# field

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

Similar Threads

  1. "Group By" causes "ODBC--Call Failed" error
    By kaledev in forum Queries
    Replies: 1
    Last Post: 03-09-2011, 02:43 PM
  2. Replies: 1
    Last Post: 10-21-2010, 12:02 PM
  3. Replies: 3
    Last Post: 02-23-2010, 06:32 PM
  4. Creating "Edit Record" link in table column
    By joshearl in forum Forms
    Replies: 1
    Last Post: 12-25-2009, 11:17 AM
  5. Replies: 0
    Last Post: 11-03-2009, 11:42 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