Results 1 to 5 of 5
  1. #1
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727

    report title

    Using access 2010. I have a subform in a report. How do i refer to a control on my subform in a report title? Tried =sfrmInfo.fname
    Doesn't work. thank you

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,598
    Try:

    Refer to field in subform
    =Forms!mainformname!subformcontainername!fieldname

    Refer to control in subform
    =Forms!mainformname!subformcontainername.Form.cont rolname
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    Not working. The is a report design.
    The name of my report: rptSCSAns t
    The name of the subform: sfrmSCSMedInfo and the name of the control: fname and lname
    I tried all variations including.
    =reports!rptSCSAns!sfrmSCSMedInfo!fname
    = reports!rptSCSAns!sfrmSCSMedInfo!form.fname

    I even tried to just reference a control on the main report:
    =reports!rptSCSAns!SSN
    What am I doing wrong. Thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,598
    I've never used a form as subreport.

    I just tested a textbox on main form that references a control in subform. I used the second suggested syntax. It works. Should be same on a report, except with the Reports qualifier.

    I always give subform/subreport container control name different from the object it holds, like ctrMedInfo. Sometimes seems to make a difference.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    Got it. I wasn't using a text box Duh!! thanks for all your help! Will mark closed.

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

Similar Threads

  1. Edit chart title on report
    By dougie in forum Programming
    Replies: 0
    Last Post: 12-10-2012, 06:56 AM
  2. InStr Parameter in Report Title
    By Huddle in forum Reports
    Replies: 4
    Last Post: 12-04-2012, 02:31 PM
  3. Dynamic Chart Title in Report
    By Kirsti in forum Reports
    Replies: 10
    Last Post: 03-21-2012, 01:56 PM
  4. Replies: 1
    Last Post: 11-21-2011, 03:22 PM
  5. Replies: 20
    Last Post: 05-24-2010, 06:31 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