Search code examples
ms-accessvbams-access-2007

Access Report, get value from parent report


I have a report. Within that report is a sub report. And, there's a sub report within the first sub report. Anyway, each report has a stored query as its data source. The structure looks like this:

  • Main Report
    • Sub Report 1
      • Sub Report 2

I would like the stored query in Sub Report 2 to reference a field in Sub Report1. But, every time I run the report, I get a message box asking for the value. Here is the bit in my query that references the field:

[Reports]![MainReport]![SubReport1]!Report![Text70].value

Anyone know the correct syntax?


Solution

  • Not sure why, but leaving off value seems to have done it.

    So, just something like: [Reports]![MainReport]![SubReport1]!Report![Text70] works.