• Date/Weekday Question (Access 2K3)

    Author
    Topic
    #427602

    Hello all again!

    I’m having trouble figuring out how to have Access take a date and return the Saturday after the given date. Here is an expression field:

    LastDate: Max((SELECT Max(Date) FROM tblUtilProd))

    Now, I’m wondering how (hopefully without creating another field) to have LastDate be the Saturday after the date returned by Max(Date). Any ideas?

    Thanks so much in advance!

    Viewing 0 reply threads
    Author
    Replies
    • #991194

      I don’t understand why you have the outer Max. Doesn’t

      LastDate: (SELECT Max(Date) FROM tblUtilProd)

      or

      LastDate: DMax(“Date”,”tblUtilProd”)

      return the last date? To get the next Saturday, create another column

      NextSaturday: [LastDate]+7-Weekday([LastDate])

      • #991216

        You’re right, as usual.

        The outer MAX was redundant, and the formula for the next Sat. works perfectly.

        Thanks again!

    Viewing 0 reply threads
    Reply To: Date/Weekday Question (Access 2K3)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: