Help with reports On Format

R

Rodney

Hope someone can help with this I’m nearly bald

I am creating a form with a subform for a monthly calendar set out in
landscape to display the month & year at the top of the page with Sunday to
Saturday under that followed by a box for each day of that month with the
date for that day in the top left corner, set out like a general monthly
calendar.

I have the main Report which gets the month & year from a form and a
subreport which is linked to the main report with a field named YrMth.

The CalendarDate Header section of the subreport is displaying the month &
year followed by Sunday to Saturday across the page.

In the details section of the subreport I have a control box named
Calendar_Date with the control box height & width set to 2.937cm & displays
the days date (as in"d") in the top left corner. I also have added the
following event procedure to the On Format which moves the layout to display
a box under the correct day for that date.

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

Now so far this all work fine.

What I have done know is added another control named RosterDetails which is
concatenated

=Format([RosterStartTime],"Short Time") & "-" &
Format([RosterEndTime],"Short Time") & " " & [TrainerFirstName] & " " &
Left([TrainerLastName],1)

Now all this sort of works it shows the correct data but in one column down
the left side I can't get it to move layout to correspond to with the correct
day/date. None of the code I have tried adding to the above will worked.

Any ideas would be very much appreciated.
Sorry if I was a bit long winded

Rodney
 
R

Rodney

Thank Duane Ill check out your link

Thanks for the help.

Rodney

Duane Hookom said:
You might want to look at the calendar style reports at
http://www.access.hookom.net/Samples.htm. I don't recall much code other than
to draw some lines around the days in the calendar.
--
Duane Hookom
Microsoft Access MVP


Rodney said:
Hope someone can help with this I’m nearly bald

I am creating a form with a subform for a monthly calendar set out in
landscape to display the month & year at the top of the page with Sunday to
Saturday under that followed by a box for each day of that month with the
date for that day in the top left corner, set out like a general monthly
calendar.

I have the main Report which gets the month & year from a form and a
subreport which is linked to the main report with a field named YrMth.

The CalendarDate Header section of the subreport is displaying the month &
year followed by Sunday to Saturday across the page.

In the details section of the subreport I have a control box named
Calendar_Date with the control box height & width set to 2.937cm & displays
the days date (as in"d") in the top left corner. I also have added the
following event procedure to the On Format which moves the layout to display
a box under the correct day for that date.

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

Now so far this all work fine.

What I have done know is added another control named RosterDetails which is
concatenated

=Format([RosterStartTime],"Short Time") & "-" &
Format([RosterEndTime],"Short Time") & " " & [TrainerFirstName] & " " &
Left([TrainerLastName],1)

Now all this sort of works it shows the correct data but in one column down
the left side I can't get it to move layout to correspond to with the correct
day/date. None of the code I have tried adding to the above will worked.

Any ideas would be very much appreciated.
Sorry if I was a bit long winded

Rodney
 

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