Tags: access, calendar, calendars, database, duane, duanes, fit, hookom, managed, microsoft, mysql, oracle, pick, revise, schedule, sql, thatwould, weekly

Hookom's Weekly Schedule Calendar

On Database » Microsoft Access

2,810 words with 3 Comments; publish: Sun, 01 Jun 2008 14:33:00 GMT; (25061.52, « »)

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

All Comments

Leave a comment...

  • 3 Comments
    • 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)

      Dave Hargis, Microsoft Access MVP

      "Mr-Re Man" wrote:

      > 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

      >

      #1; Sun, 01 Jun 2008 14:34:00 GMT
    • 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.

      "Klatuu" wrote:

      [vbcol=seagreen]

      > 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)

      > --

      > Dave Hargis, Microsoft Access MVP

      >

      > "Mr-Re Man" wrote:

      #2; Sun, 01 Jun 2008 14:35:00 GMT
    • 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

      "Mr-Re Man" wrote:

      [vbcol=seagreen]

      > 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.

      >

      >

      > "Klatuu" wrote:

      #3; Sun, 01 Jun 2008 14:36:00 GMT