Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Atlanta, GA

    Unanswered: Set report caption on open acViewNormal

    I have a series of reports that I generate to PDFs on a regular basis, and save them with names concatinated with a calculated date.

    I have no problems setting the captions to my reports when I open them in preview mode (acViewPreview), but when I open them directly to the printer (acViewNormal), the caption reverts back to the name of the report in my access project...

    I have set the caption in both the OnOpen event and the OnActivate events, to no avail... any suggestions?

    here's what my code looks like for this, if it helps...

    Private Function getCaption() As String
    ' The getLastFriday function retreives the date of the prior friday
    ' The cvtDateTitle Function converts a date to the format yyyy-mm-dd

    getCaption = cvtDateTitle(getLastFriday()) & " WSI Week Only"

    End Function
    Private Sub Report_Open(Cancel As Integer)
    Me.Caption = getCaption()
    Debug.Print getCaption
    End Sub

  2. #2
    Join Date
    Mar 2004
    Berlin, Germany
    open the report from a routine

    docmd.openreport ReportName, acViewDesign
    set the caption
    docmd.openreport ReportName


Posting Permissions

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