Latest Date Query

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tony Schoeffler

    Latest Date Query

    I have a table that includes fields InspectionDate and BuildingNumber.
    I would like to query the data to return records showing the most
    recent InspectionDate for each unique BuildingNumber. There are about
    150 unique building numbers. Use of either query criteria or VBA
    techniques are OK. Thanks in advance for any help or guidance.

    Tony

  • Tom van Stiphout

    #2
    Re: Latest Date Query

    On Fri, 13 Aug 2004 16:38:20 GMT, Hugh.A.Schoeffl er@lerc.nasa.go v
    (Tony Schoeffler) wrote:

    You want to create a Totals query, which groups by building number.
    Then get the Max of your InspectionDate:
    select BuildingNumber, Max(InspectionD ate) from MyTable
    Group By BuildingNumber

    -Tom.

    [color=blue]
    >I have a table that includes fields InspectionDate and BuildingNumber.
    >I would like to query the data to return records showing the most
    >recent InspectionDate for each unique BuildingNumber. There are about
    >150 unique building numbers. Use of either query criteria or VBA
    >techniques are OK. Thanks in advance for any help or guidance.
    >
    >Tony[/color]

    Comment

    Working...