Solved

reference a subform to a report

Posted on 2004-09-28
2
541 Views
Last Modified: 2012-05-05
I have a report which displays fields from a form and a subform. the data displayed in the form/subform(master/child) are the source of the report.
My form is bound but my report is unbound.

The fields in the report reference the fields in the form like this =forms!formname!fielName
this works great when the report field source is the master form form displaying the correct values in the report however, it does not work for the report fields depending on the child form(subform). the report fields based on the subreport display #name?.

in the report, the fields based on the subform I have tried =forms!subformname!fieldName. I have also tried =forms!formName!subformName!fieldName. either way these fields do not display the expected value instead they dispaly #Name?

does anyone know the syntax to make this work?

I hope I'm explaining my problem enough for you to help me, if not ask me questions.
0
Comment
Question by:lallentx
2 Comments
 
LVL 12

Accepted Solution

by:
pique_tech earned 125 total points
ID: 12174446
=forms!formName!subformName.Form!fieldName
                                             ^^^^^
You have to "tell" Access that you want to refer to something of the subform AS A FORM, which requires the one additional little tid-bit.

Hope this helps.
0
 

Author Comment

by:lallentx
ID: 12174776
thanks pique tech, such a little thing can make such a big difference.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Database tuning – How to start and what to tune. This question is frequently asked by many people, both online and offline. There is no hard and fast rule-of-thumb for performance tuning, however, before beginning the tuning process one should a…
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now