Results 1 to 11 of 11
  1. #1
    SFC is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    47

    Form label in a report


    I created a form that basically is a launch point to a report. The form has a textbox for notes and a button to print the report. I have a label in the form which is a few lines of text, can I have the label show in the report? I put a text box in my report and the control source references the label in the form but when I print, nothing is displayed in the textbox in the report. Any feed back is greatly appreciated.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is the Form still open and did you reference the control correctly? http://access.mvps.org/access/forms/frm0031.htm

  3. #3
    SFC is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    47
    Yes the form is open (form view) and I click a print button that runs a macro to open the report (a table in the same file). Here is the source code for the textbox in the report:
    =[Forms]![Form1]![Standard Notes]
    Standard Notes being the label name in the form.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I would think that would work as long as you are referencing the correct control. Are you talking about Report View or Print View of the report?

  5. #5
    SFC is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    47
    print view

  6. #6
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Labels don't have a VALUE so you need to use their CAPTION

    =[Forms]![Form1]![Standard Notes].Caption


    or change the label to be a text box and just format it to look like a label.

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Thanks Bob. I just realized the OP really did mean Label.

  8. #8
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Quote Originally Posted by RuralGuy View Post
    Thanks Bob. I just realized the OP really did mean Label.

  9. #9
    SFC is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    47
    I tried using the caption method;
    =[Forms]![Form1]![Standard Notes].[Caption]
    When I print preview I get.... #Name?
    I then tried making the text box in the form have the label as the source code but still get the same results.

    changing the label to a textbox also gives me the same results....#Name?

  10. #10
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Caption should not have square brackets around it. Is this label on a SUBFORM?

  11. #11
    SFC is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    47
    Access automatically puts on the brackets, even if I delete them they pop back on.

    However, I got it! this works
    =[Forms]![Form1]![Label13].[Caption]

    Thanks Bob and Ruralguy for your help

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

Similar Threads

  1. Label report
    By Gavroche in forum Reports
    Replies: 1
    Last Post: 10-18-2011, 08:44 PM
  2. Report Label
    By brandonze in forum Reports
    Replies: 1
    Last Post: 08-03-2011, 01:51 PM
  3. Label in Report
    By devcon in forum Forms
    Replies: 3
    Last Post: 07-10-2010, 12:29 AM
  4. Replies: 0
    Last Post: 11-24-2009, 03:23 PM

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