Always find Sunday the first day of the week

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
 
R

Ronald Dodge

Try the following command:

Dim ThisSunday As Date
ThisSunday = DateValue(Date) - Weekday(Date,1) + 1
 
R

Ronald Dodge

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.
 

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