A *running sum* text box in the subreport? Hmm. That's probably a timing
issue, i.e. at the time the main report reads the value from the subreport,
only the first record has been accessed.
Is there any chance of placing a text box in a group footer in the
subreport, and setting its ControlSource to:
=Sum([SomeField])
so that this box is dependent on all the others, and so Access can get the
total only after it is completed?
(You can set the Visible property of the text box or even the group footer
section to No if you don't want it shown.)
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Pecanfan" <pecanfan@no.spam> wrote in message
news:1120228451.548535@smtp-1.griffin.com...[color=blue]
>
> I've got an access report which contains a sub-report. The sub-report
> contains various items in a group Footer which culminates in a running sum
> text box called txtGrandTotal. I want to use this 'total' in the main
> report so I have a text box with the following:-
>
> =([Reports]![RPT_MainReport]![RPT_SubReport].[Report]![txtGrandTotal])
>
> For some reason, which I'm sure is perfectly obvious but I'm buggered if I
> can think why, the above doesn't actually show the grand total. Instead
> it
> shows the value of the first record in the sub-report's group footer.
> I.e.
>
> txtGrandTotal in RPT_SubReport shows the CORRECT value
>
> [Reports]![RPT_MainReport]![RPT_SubReport].[Report]![txtGrandTotal] shows
> the INCORRECT value
>
>
> What am I missing?!?
>
> TIA,
>
> Andy[/color]