Search code examples
ms-accessms-access-2016

Using Max in Access 2016


I'm trying to run a query that returns the maximum number in the ballNumber field when the value in the inningsNo field is 1. I just can't get it to work. Can anyone tell me what I should enter into the Criteria box?

enter image description here

Thanks


Solution

  • Rob,

    To do this, you will need to do the following:

    1. Click on the "Totals" button on the Query ribbon (a new row will appear in the Query grid labelled "Total");
    2. Change the "Group By" Total value to "Where" in the InningsNo column (the tick in the "Show" will also disappear);
    3. Change the "Group By" Total value to "Max" in the ballNumber column.

    Regards