Always find Sunday the first day of the week

  • Thread starter Thread starter Gina Whipp
  • Start date Start date
G

Gina Whipp

I know I'm going to feel like my common sense is slipping away but I just
want one line to always return Sundays' date. Example when the form opens
up it's the 6th but I want to see the 2nd. If you opened the form last week
you would see the 26th.

As always.... Thanks in advance!
Gina
 
Try the following command:

Dim ThisSunday As Date
ThisSunday = DateValue(Date) - Weekday(Date,1) + 1
 
LOL, you quite welcomed. Any one of us could overlook something and later
on, ask ourselves why we didn't think of it before. Guess that's part of
our human nature as we aren't perfect. When I first got into coding (about
10 years ago), that was one of the first things I started messing with, date
and time stuff, though my first real coding experience started out with
TCZ's (The Chatting Zone) online mud coding (the soft code side of it). Of
course, I have worked with spreadsheet formulae for quite some time before
then, but since then, I have also added to my knowledge, VBA coding (Excel,
Access, and Project mostly), DAO, SQL, some HTML, and a little with C
Programming.
 
Back
Top