Next Friday

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
 
J

John Vinson

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.
 
A

Allen Browne

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top