Results 1 to 7 of 7

Thread: Max Date (2003)

  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Max Date (2003)

    I have a query which when run qives me the latest date of a list of items calibrated. I have a DateLastCalibrated, DateDue, and completed. I have the Totals of the Date fields in the query set to Max. Everything works fine until I tick completed, in which case the Max dates are displayed along with the previous DateLastCalibrated and DateDue. There are two tables in the query. One contains the main details of the item, the other the records of calibration. It is the latter that holds the two date fields. Am I using Max in the right way?

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

    Re: Max Date (2003)

    Do you need Completed in this query?

  3. #3
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Max Date (2003)

    Yes. A report uses the query to show when the next calibration is due. If Completed is ticked, this shows up a different colour.

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

    Re: Max Date (2003)

    It can probably done by creating two or three queries. It would be a lot easier if you could post a stripped down copy of your database. See <post#=401925>post 401925</post#> for instructions.

  5. #5
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Max Date (2003)

    Q19 is a good example of the problem. It only appears once in the qryCalibrationDue unless Complete is ticked.
    Attached Files Attached Files

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

    Re: Max Date (2003)

    See attached version. I added an intermediate query qryCalibrationDue1.
    Attached Files Attached Files

  7. #7
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Max Date (2003)

    Thanks Hans. A little modification to my report, and your query worked. Thanks again.

Posting Permissions

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