Get data from subreport

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a main report with a subreport on it, and I want
the RecordSource of one text box on the main report to
point to the top row (first record) of a certain field in
the subreport; is there any way to get it. ?

Thanks

Scott
 
Scott,

There may be other ways, but this is how I would do it... I would not
try to do this within the report itself. I would make a query, based on
the query which is currently the Record Source of your subreport, which
returns the value of the field of the subreport record you require. And
then I would either add this to the query that the main report is based
on, so the control on the main report can be directly cound to this
field in the query, or I would use a DLookup function as the control
source of the textbox on the main report, to reference the value from
the query. Which of these options I would choose, would depend on
various factors which I don't know about in your case.
 
Back
Top