Next Friday

  • Thread starter Thread starter Alain
  • Start date Start date
A

Alain

Using Access 2002 I am using a form from which I want to
be able to calculate the next Friday's date from the
current date

Any suugestions as to how this could be done?


Thanks in advance

Alain
 
Using Access 2002 I am using a form from which I want to
be able to calculate the next Friday's date from the
current date

You can use the DateAdd and Weekday functions to do this:

=DateAdd("d", 8 - Weekday(Date, vbFriday), Date())

as the control source of a textbox on the form. If you open the form
on Friday it will show the next Friday, not the current day.
 
Next Friday is:
Date() - Weekday(Date(), 6) + 8

That tells Access to assume a week starts of Friday (vbFriday = 6), subtract
the date of the week (which gives you the last day of the previous week),
and add 8 days to get to the next Friday.
 
Back
Top