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
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
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.
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
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.
Got it. I wasn't using a text box Duh!! thanks for all your help! Will mark closed.