Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Sep 2006
    Location
    Jhongli, Taiwan
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conditional Format days (2007 SR-1)

    Anybody out there know how to set conditional formatting to fire on a form when a Date field date is NOT a weekend day (eg: Saturday OR Sunday)?

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Conditional Format days (2007 SR-1)

    You want to set a conditional formatting using the "Expression Is" condition as follows (assuming your field is "testdate"):

    Weekday([testdate]) Between 2 and 6

    And then choose your display characteristics accordingly.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

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

    Re: Conditional Format days (2007 SR-1)

    Alternatively, you can use this condition:

    Weekday([testdate], 2) < 6

    The 2 as second argument specifies that Monday is used as first day of the week, so Monday = 1, Tuesday = 2, ..., Saturday = 6 and Sunday = 7.

  4. #4
    Lounger
    Join Date
    Sep 2006
    Location
    Jhongli, Taiwan
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='MarkLiquorman' post='760508' date='22-Feb-09 20:48']You want to set a conditional formatting using the "Expression Is" condition as follows (assuming your field is "testdate"):

    Weekday([testdate]) Between 2 and 6

    And then choose your display characteristics accordingly.[/quote]

    Thanks Mark. You guys are GREAT! Sorry it took so long to say thank you. As you know, your site was down for the upgrade, which, by the way looks great too! Thanks again.

  5. #5
    Lounger
    Join Date
    Sep 2006
    Location
    Jhongli, Taiwan
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='760561' date='23-Feb-09 01:36']Alternatively, you can use this condition:

    Weekday([testdate], 2) < 6

    The 2 as second argument specifies that Monday is used as first day of the week, so Monday = 1, Tuesday = 2, ..., Saturday = 6 and Sunday = 7.[/quote]

    Thanks Hans. The additional info always helps to let me know what is going on in the Access mind. Sorry for not thanking you earlier but the site update (which by the way looks great) kept me locked out until now. Keep up the good work!

Posting Permissions

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