Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Vacation Calendar by the month 4

Status
Not open for further replies.

PlumDingo

Technical User
Aug 3, 2004
46
0
0
US
I have a database that currently has all Scheduled vacation for the year in a table. I have been trying to convince my co-workers to come out of Excel and use this instead. The only problem is that they want a report of the Scheduled vacation to come out in a monthly calender format where on each day it tells you who is off.

There are two options:

On the y axis the Employee name grouped by classification with the day of the month along the x axis and there is maybe a check off box or something next to the employee name denoting whether or not they are off and the number of hours.

Another option would be to have an actual calendar print out (a traditional monthly calendar) that would list only the people who are off for that day in the box.

The size of the report is not realy a constriction because currently we print out our Excel calendar on an E sized drawing paper.

I have looked at the link: and it is concerned with appointments and on a weekly basis. My use is not really for appointments but mostly scheduling purposes to let us supervisors know what resources we have available that day.

Is any of this possible.

Please let me know if you need more information on the database. My baby is crying and I have to go and get him.

Thanks,

FJ
 
I think that we are taking the same thing. WHen I say width, I basically mean height. THe way the code I pased before read to me, for each row, it finds the maximum height of that row of subreports. I want it to make the height of all he subreports the same, that it why I attempted too add that code it, It basially works until I attempt to get the bottom line on the claendar. I wish that I had a way to show you what I mean. I tried to move the line up on the datial section eih no luck. Do you hav any ideas?

France
Just trying to get by.
 
I recreated my calendar report with 7 date subreports. Each subreport and the text boxes above them are all the exact same width and the fit snug against each other. The naming of the controls is applied consistant.
Code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
    Dim lngHeight As Long 'store the height of tallest control
    Dim i As Integer
    Dim lngLeft As Long
    For i = 0 To 6
        'compare heights
        If Me("srpt" & i).Height > lngHeight Then
            lngHeight = Me("srpt" & i).Height
        End If
    Next
    'add the height of other control
    Me.DrawWidth = 6
    Me.ForeColor = vbRed
    lngHeight = lngHeight + Me.txtDay1.Height
    'draw the lines
    For i = 0 To 6
        lngLeft = Me("srpt" & i).Left
        Me.Line (lngLeft, 0)-(lngLeft, lngHeight)
    Next
    Me.Line (Me.srpt6.Left + Me.srpt6.Width, 0)-Step(0, lngHeight)
End Sub

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Duane,

Question. At any given time, someone could change the dates of on of my bundles. So, everytime a date (start or finish date) is change I rebuild the dateTable for that particular bundle by deleting all dates associated with that bundle and rebuild it from beginning to end, like so:
Code:
    Dim strSql As String
    Dim varDate As Variant
    
    strSql = "Delete * From tblBundleDates WHERE BundleID" &
           " = " & Me("ID")
    db.Execute strSql
    For varDate = dateFrom To dateTO
        strSql = "INSERT INTO tblBundleDates ( bundleID, 
                bundleDate) VALUES ( " & Me("ID") & ", #" & 
                 varDate & "#)"
        db.Execute strSql
    Next varDate

Now, this works, but creates serious performance issues if the date range is even 30 days long. I have routines in mind that will not have me rebuild the whole range, but there are definite senarios where it takes almost a minute for all the dates to be loaded. Can you think of a way in which this can be greatly reduced. Thanks

- Jedi420

A man who has risked his life knows that careers are worthless, and a man who will not risk his career has a worthless life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top