Hookom's Weekly Schedule Calendar

M

Mr-Re Man

Hi, hopefully Duane will pick this up, but if anyone else can help out that
would be great.

I have managed to revise Duanes calendars to fit in with my database,
everything is woking fine, the only part that I would like to run more
efficiently is the Weekly Schedules, when I run the report it starts at the
first week that data was entered.

In my case, last week, the 2nd of July, I want it to start at the week we
are currently in the 9th July.

Is there anyway that I can on opening the report get it to start on the
Monday of the current week.

tia
 
K

Klatuu

Here is a way to calculate the first Monday of a week. Pass it any day within
the week and it returns the Monday of that week:

WeekStartDate = DateAdd("d", vbMonday - DatePart("w", SomeDate), SomeDate)
 
M

Mr-Re Man

Thanks for this, I presume that SomeDate would be TravelDate as this is the
only date field I have set-up.

But more importantly, where would I put this code?

thanks for you help so far.
 
M

Mr-Re Man

I forgot that oart of Duane's program includes a field called WeekOf which
calculates the beginning of the week (a Sunday).

So the code you kindly provided would, when the report is opened, display
the current weeks bookings and not previous weeks that have passed. (I have
used the calendar for journey appointments for the elderly).

thanks again
 

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