If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Help with reports On Format
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 |
#2
|
|||
|
|||
Help with reports On Format
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" wrote: 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 |
#3
|
|||
|
|||
Help with reports On Format
Thank Duane Ill check out your link
Thanks for the help. Rodney "Duane Hookom" wrote: 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" wrote: 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 |
Thread Tools | |
Display Modes | |
|
|