Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2012
    Posts
    68

    Unanswered: Date Calculation Expression

    I have 2 Tboxes

    Today's Date: tdate
    Week Ending date: wedate

    when Today's date: is populated with today's date (mon thru fri) i want the week ending date to display always with firday's date.

    Guessing i need an expression?? looked at dateadd and other date calcs, nothing i can see working except expressions.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    not to sure I know what you want to do

    is it calculate the next week ending date, whch is 'always' going to be a friday
    if so then a bit of VBA code using dateadd and soem other date/time functions in a function is the way to go

    I say 'always' because, depending where you are there may well be weeks which don't end on a Friday. In the Christian world that probably means Good Friday and when Christmas lands on a Friday and any other publiuc holidays that your country may have


    it may be as simple as
    Date() - WeekDay(Date()) + 6
    Functions for calculating and for displaying Date/Time values in Access suggests it should be Date() - WeekDay(Date()) + 6, but that will probably give you a saturday adding 6 instread of 7 may give you the friday date
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Mar 2012
    Posts
    68
    Thanks healdem. After reading your post i just simplified it by just have a date box so a date can be selected. The text box remains the same until after update.

Posting Permissions

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