• Produce a calendar (Version 97)

    Author
    Topic
    #386469

    I have an access database that we use to schedule our employees for courses. Currently, I have a screen that looks like a calendar, you click on the day and at the bottom a subform displays the courses offered that day. As you know some days will have more information than other days. I have a report to print but it prints by sorting on date offered in ascending order. I would love a report to print like a calendar with all the courses offered under the number in a nice format.

    Does anyone know how this could be accomplished?

    Thanks a bunch!

    Deborah

    Viewing 0 reply threads
    Author
    Replies
    • #670925

      If you want a monthly calendar, you might create a main report with text boxes for the days of the month (control source =1, =2, …, =31) laid out the way you want, and subreport controls below each text box to display the schedule for each day. All subreport controls could share one source object; they should be linked to the main report by means of the text boxes (and probably, by the month and year).
      In the OnOpen code of the report, hide the text boxes at the end that are not appropriate.

      If you want something that really looks like a calendar, you probably need to build the entire report in code.

      • #670926

        Hans,

        Thanks for the reply. I understand the idea behind generating the text boxes but I am lost on this part (see below).

        All subreport controls could share one source object; they should be linked to the main report by means of the text boxes (and probably, by the month and year).
        In the OnOpen code of the report, hide the text boxes at the end that are not appropriate.

        Can you clarify a little more or produce a sample?

        Thanks,
        Deborah

        • #670930

          By “one source object” I meant that it is not necessary to have 31 subreports in the database window. You can place 31 copies of the subreport on the main report. Since each will have to display data for a single day, you will have to use the linkmasterfields and linkchildfields to do this. (The alternative would be to have 31 subreports in the database window, identical except for their record source)

          Since not all months have 31 days, you would need to hide the text box for day 31 if the month is April, for instance. The subreport will hide itself if there are no data.

          Perhaps I’ll whip up an example, but not immediately.

        • #671113

          I have attached a very rough demo. It is by no means a finished product, but it demonstrates the ideas from my previous replies.

          The main report contains 31 copies of the same subreport, but each is linked to the main report by the text box above it (which represents the day of the month), and by the text boxes in the report header (month and year). The subreport contains a visible text box to display a course, and invisible text boxes for day, month and year.

    Viewing 0 reply threads
    Reply To: Produce a calendar (Version 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: