views:

463

answers:

1

I am having difficulty figuring out how to number my subreport's records. I have a main report, which provides indentifying information for one record. Within the main report is a subreport, which provides records assoicated with the main report. I wanted to number these records from one to how ever many records there are. I tried the running sum feature in properties (i.e. textbox = 1, running sum = over all) and it works when the subreport is open, without the main report; however, when the main report is open the subreport running sum doesn't function (i.e. it just shows the number 1 for every record).

I understand that this is a main report/subreport drawback. Does anyone know how to get around this or a VBA solution that I can add within an On Open event?

Thank you,

DFM

+1  A: 

I did a quick test using Access 2003 and your approach works fine.

I created a textbox in the sub-report in the detail section:

Control Source = "=1"
Running Sum = "Over All"

Something else must be going on.

DJ
Thank you for the response - I broke down my main report/subreport RS structure and found that my link child and link master field associated with the subreport is causing the problem. Unfortunately, without these links I get duplicate records in my report. Hence, if I have three records in the query, as the RS, I end up with 9 records in my subreport, which are duplicates of each of the three records. I guess I will have to mess around with this a little more.