Results 1 to 2 of 2

Thread: ACCESS: How To: Set Label Caption in a Report [RESOLVED: OpenArgs]

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045

    Resolved ACCESS: How To: Set Label Caption in a Report [RESOLVED: OpenArgs]

    Esteemed Forum Participants and Lurkers:
    ===============================
    ACCESS '02, '03

    I have a common Report format for 4 different Departments, and in the code with the 'Department Selector' buttons I am trying to change one of the Labels in the report "Page Header" to reflect the different department selection. I have tried many approaches, but nothing seems to work yet. Here is what I am working with now:

    Added Note: The following code does PRINT correctly, and it also displays correctly on pages 2 and above for multiple pages. It just doesn't affect Page 1 displayed in a window!!!
    Code:
    Private Sub Command0_Click()
        Dim aWhere As String
        'Select a WHERE statement (from Global List) based on the Radio Button Group
        aWhere = aDept(Form1.Grp_Dept.Value)
        
        'This successfully opens a window with the correct Report
        DoCmd.OpenReport "Price_1", acViewPreview, , aWhere, acWindowNormal
        
    '''TEST TEST TEST TEST    This WORKS
    MsgBox Reports("Price_1").Controls("Dpt_Label").Caption
    '''END TEST
    
        'Can a Report be changed once it is open???  This doesn't change anything!
        Reports("Price_1").Controls("Dpt_Label").Caption = "TEST 1"
        
    End Sub
    Any and all comments, suggestions, and assistance is sincerely appreciated.
    Last edited by Webtest; Aug 23rd, 2005 at 12:03 PM. Reason: RESOLVED
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

Posting Permissions

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



Click Here to Expand Forum to Full Width