Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use a custom aggregate function in a Group Section

Status
Not open for further replies.

TheoCal

Vendor
Apr 30, 2003
5
0
0
US
I am using a custom function which requires two arrays as input.
I wish to place the function in a group footer of a report.

It seems that a built-in aggregate function like =SUM([Cashflow]) treats the field Cashflow on my report as a ParamArray or a Recordset or some other multivalued entity but when I pass [Cashflow] to my custom function, it seems to be treated as a single value.

Can anyone describe how to get a recordset or array (by group section) to a custom function?

Theo, I Get It!(r) Development
 
When an ACCESS report has a Group Header or Footer with an aggregate function such as you described it makes two passes through the recordset. It is not passing an array or a recordset but rather it sets up the sorting and grouping on the first pass and then rollups the values for the aggregate functions in the Group headers and footers in the second passs.

I hope that this helps you understand the process.

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top