Default Dates

  • Thread starter Secret Squirrel
  • Start date
S

Secret Squirrel

I have two unbound text controls on my form. How can I make them default to
the last full weeks Monday & Friday? For example today is 12/8/08 so I would
want one to be 12/01/08 and the other to be 12/05/08.
 
J

John W. Vinson

I have two unbound text controls on my form. How can I make them default to
the last full weeks Monday & Friday? For example today is 12/8/08 so I would
want one to be 12/01/08 and the other to be 12/05/08.

Set the DefaultValue to

=DateAdd("d", -5-Weekday(Date()), Date())
and
=DateAdd("d",-1-Weekday(Date()), Date())

respectively.
 
S

Secret Squirrel

Thanks John!

John W. Vinson said:
Set the DefaultValue to

=DateAdd("d", -5-Weekday(Date()), Date())
and
=DateAdd("d",-1-Weekday(Date()), Date())

respectively.
 
Top