Dates Monday thru Sunday

C

Chuck216

Hi

I have two text boxes on a form that I would like the default values to be
Dates the first box Monday and the second box Sunday of what ever week it
happens to be when the form is opened. Basically so that I have “ Week of
Date1 thru Date2†any help with this will be greatly appreciated.

Chuck
 
D

Dirk Goldgar

Chuck216 said:
Hi

I have two text boxes on a form that I would like the default values to be
Dates the first box Monday and the second box Sunday of what ever week
it
happens to be when the form is opened. Basically so that I have “ Week
of
Date1 thru Date2†any help with this will be greatly appreciated.

So your week is from Monday to Sunday? I can't say for sure that this is
the best way to do it, but you could set your fierst text box's Default
Value to:

=DateAdd("d",1-Weekday(Date(),2),Date())

And your second one to

=DateAdd("d",7-Weekday(Date(),2),Date())
 

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