default to last working date in week

  • Thread starter Thread starter gymphil
  • Start date Start date
G

gymphil

Can anyone please advise on how to set a forms control to default to a date
(last Friday in current week) in the format yyyymmdd. New records are added
throughout the week but the default date should always be the Friday.

Thanks
 
hi
for countries with sunday=1 and saturday=7,
to find next friday's date, set the DefaultValue property of the control to:
=DateAdd("d", 6 - Weekday(Date), Date)
this will set the date to the current week's friday - no matter which day of
the week is it (including saturday!!)

good luck
erez.
 
Erez,

Thanks for the reply.
As you suggested I added =DateAdd("d", 6 - Weekday(Date), Date) as the
default but I now get #NAME? displayed in the control, any ideas?

Phil
 
Back
Top