custom function against selected records

custom function against selected records

Does anyone have a code snipet I can use to run a custom function against a selected record/s in a report?

I want to be able to open a report with multiple records.  select one or more of those records with the check box, and then run a custom function against just those.