Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    May 2005
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MinMax and date (2003)

    I am trying to find the minimum and maximum weight as well as the first and last weight. The minimum and max work well but the 'last' weight is a problem. It appears that by last it returns the last ID date not the last temporal date. If I sort the table 'tblOrder' by ascending date and save it and then add an autonumber field the ordering is again temporally out of sequence. Is there a ghost in the data. I've enclosed a sample database. Thanks

    nebbia
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: MinMax and date (2003)

    First and Last don't take the date into account, they simply take the value from the first and last record they encounter while traversing the records in the table.
    To find the weight for the oldest and newest date, you must use two queries. See the attached version. The query qryTotal is the one that returns the values you want.
    Attached Files Attached Files

  3. #3
    2 Star Lounger
    Join Date
    May 2005
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MinMax and date (2003)

    I guess I just didn't understand the first last scenario. The two queries will work fine Thanks for the insight and help
    nebbia

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •