Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Apr 2005
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date/Weekday Question (Access 2K3)

    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!

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

    Re: Date/Weekday Question (Access 2K3)

    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])

  3. #3
    Star Lounger
    Join Date
    Apr 2005
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date/Weekday Question (Access 2K3)

    You're right, as usual.

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

    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
  •