Report Calendar

D

Duane

Hello,

I am trying to add some additional functionality to a report but I am not
sure how to do it or if it can even be done. The report is run when the user
selects the month/year from a drop down menu.

The report is called rptCalendarAnnual. In the detail section of
the report is a sub report called srptMonth. Both reports are based
on the following query.

SELECT tblCalendar.CalendarDate, Format([CalendarDate],"yyyymm") AS YrMth
FROM tblCalendar;

The reports are linked on the YrMth field. The srptMonth report has a
CalendarDate Header with labels for each day of the week. In the detail
section there is one field called CalendarDate. The format is set to "d".

In the On Format Event of the Detail Section of the srptMonth is the
following code:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.txtDate.Left = (Weekday(Me.txtDate) - 1) * Me.Width / 7
If Weekday(Me.txtDate) <> 7 And Month(Me.txtDate) = Month(Me.txtDate +
1) Then
Me.MoveLayout = False
End If
End Sub

When the report is generated there are 12 seperate months, three wide and 4
high.

This calendar is for a company that utilizes a rotating work schedule. I
would like to add the groups representing the days off for each day.

I have a second table called tblROT. The table only has three fields.
MOD, Group1 and Group2. There are 196 rows of data in the table. The group
fields represent the days off. The company utilizes a rotating work schedule
and the table is such that every 196 days the schedule repeats itself.

I added the MOD field to the tblCalendar table and populated the MOD field
with the same 0 -195 just like the MOD field in the tblROT table. When I
create a query and join the two tables, the correct groups that are off for
that day are returned along with the date.

What I would like to do now that I have the correct groups off on any given
day it to add the groups to the calendar beneath each day.

Day one would have the day of the month and beneath the day would be 1-7.

I have tried to add another field and I have tried to add another sub
report, but I cannot find a way to get it working correctly.

Any help or direction would be greatly appreciated.
 

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