Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    South Carolina, USA
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Produce a calendar (Version 97)

    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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Produce a calendar (Version 97)

    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.

  3. #3
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    South Carolina, USA
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Produce a calendar (Version 97)

    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

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Produce a calendar (Version 97)

    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.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Produce a calendar (Version 97)

    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.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •