Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Week of" - beginning of the week

34 views
Skip to first unread message

Tanga Kolush

unread,
Jan 9, 1999, 3:00:00 AM1/9/99
to
Hello everyone,

I am trying to create a Summary Report, which looks like this.

Summary Report


Emp.Name Emp.Initials Closed Cases Cases Not Closed New Cases This Week

I got everything to work the way it should. My problem is to get the report
to say,

Summary Report - For the week of mm/dd/yyyy

If a person tries to generate the report, any day of the week, the report
should display the beginning of the week in the above mentioned format. eg.
if this report was generated today, Saturday, 01/09/1999, the Page Heading
should read,

Summary Report - For the week of 01/03/1999

In my report Page Header I have two txt box which displays the above line,
txtBox1 = Summary Report - For the week of
txtBox2 = Unbound (this is where I want the date for the week of 01/03/1999)

I would like to insert a formula of some sort in the controlsource of
txtBox2.

I looked into all the Access online help, relating to this, but couldnt find
the solution. Looked into DatePart function, didn't work.

Could someone please tell me how this could be possible?

Thanks in advance.


Tanga

Peter Duerden

unread,
Jan 9, 1999, 3:00:00 AM1/9/99
to

Tnaga

The way to calculate this is work out the day of the week for today's date
using Weekday then subtract the day of the week from the current date by
using the DateAdd function. See below

This line works below. Just add it to a text box on the report.

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

The "2" in the line represents Monday being the first day of the week. If
you want Sunday to be the first day then use "1", Tuesday 3 etc etc.

Let me know if it works for you.

Peter Duerden
pdue...@pjdsystems.freeserve.co.uk

Tanga Kolush wrote in message <7774v8$87h$1...@oak.prod.itd.earthlink.net>...

0 new messages