Subreport RecordCount

  • Thread starter Thread starter Keith Wilby
  • Start date Start date
K

Keith Wilby

What's the syntax I need to use to return a subreport's record count
property from its parent report? I've tried

Me.srptSubReportObject.RecordCount

and

Me.srptSubReportObject.RecordsetClone.RecordCount

in the report's Open even but that isn't it.

Many thanks.

Keith.
 
Keith,
I usually just... (assuming a continuos subform... not datasheet)
=Count(SomeKeyField) '(ex. control name = SubRecCount)
in the footer of the subform.
The main form could refer to that value when needed...
Forms!frmMainForm!frmSubform.Form!SubRecCount
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
 
Al Campagna said:
Keith,
I usually just... (assuming a continuos subform... not datasheet)
=Count(SomeKeyField) '(ex. control name = SubRecCount)
in the footer of the subform.
The main form could refer to that value when needed...
Forms!frmMainForm!frmSubform.Form!SubRecCount

Hi Al and thanks for responding. I'm working with reports and not forms and
can't get your solution to work. Have I missed the obvious?

Thanks.

Keith.
 
Spoke too soon. I needed the code in the main report detail's After Format
event (the subs format before the main IIRC). Many thanks for the tip.

Keith.
 
Back
Top