Results 1 to 2 of 2
  1. #1
    objNoob is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    21

    Modifying Label Caption in VBA Code from Form?

    I have a form that opens a report, and before I open that report I'm trying to change the caption of a label on the report. I'm having troubles accomplishing this. The label is named lblFilter

    I've tried...

    Report_MyReport.Controls("lblFilter").Caption = txtDate.value

    and...

    Report_MyReport.lblFilter.Caption = txtDate.value




    And, it just not working. I'm not sure how to reference that label's caption property properly.
    Last edited by objNoob; 03-24-2010 at 02:24 PM.

  2. #2
    objNoob is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    21
    I just declared a public variable in the Report Code. Assigned the value to that variable from my form, and used the reports class open event sub to assign it to it's label control.

    Baddabing!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 11-24-2009, 03:23 PM
  2. Modifying an import specification
    By ronzul in forum Import/Export Data
    Replies: 3
    Last Post: 11-12-2009, 05:03 AM
  3. Caption Property & Queries
    By jhrBanker in forum Queries
    Replies: 3
    Last Post: 08-21-2009, 02:28 AM
  4. Modifying Update Query
    By James Elvin in forum Queries
    Replies: 0
    Last Post: 10-14-2008, 09:07 AM
  5. What I am doing wrong? (caption of report)
    By swampdonkey in forum Reports
    Replies: 0
    Last Post: 12-07-2006, 11:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums