Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Mar 2003
    Location
    Summerville, South Carolina, USA
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dynamic Caption (Access 2000)

    Is there a way to make the title of a report dynamic? That is to change the title of the report in the Caption property to reflect the subject field of the report header.

    Thanks.

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

    Re: Dynamic Caption (Access 2000)

    Set the caption in the On Format event of the report header section:

    Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
    Me.Caption = ...
    End Sub

  3. #3
    Star Lounger
    Join Date
    Mar 2003
    Location
    Summerville, South Carolina, USA
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dynamic Caption (Access 2000)

    Thanks. That works great. Next question... to extend this code.

    I want to send an email with this object as an attached snapshot. This is on a form with the onClick of a command button. When I do this, however, it keeps the original name of the rpt. It no longer sends it with the dynamic caption. Is there something that I can do to allow it to format the snapshot also.

    Thanks

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

    Re: Dynamic Caption (Access 2000)

    The caption of a report is only used when the report is displayed in Access. It is independent of the name of the report; the latter is used to determine the name of the snapshot file. I don't see a workaround.

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Dynamic Caption (Access 2000)

    I may be wrong but , I think I have done this before.
    What you do is to show the report in preview, then email the report via SendObject (I think), then close the previewed report.

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

    Re: Dynamic Caption (Access 2000)

    Yes, that works! Thanks for pointing this out (I believe you posted something like this once before, but I had completely forgotten about it.) <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>

Posting Permissions

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