Programmatically alter detail of a report, then use that report as subreport

markpeace

New member
Local time
Today, 12:39
Joined
Jun 26, 2013
Messages
1
Hi all,

I have a report which programmatically sets the value of some labels based on its own internal logic for each line of the detail section of a report. This all works fine and dandy, using the Detail_format event, and accessing detail.controls.item(x).caption.

HOWEVER, when I then embed the report as a subreport (which I need to do), I goes wrong. Here, I get the values of the last row of the detail repeated in every previous one. I'm suspecting because the parent report has its own 'detail' (I've tried giving the subreport its own distinct detail name).

Can anyone offer an insight?
 
It should not matter. One thing to check, the On Format event only fires when you print or print preview, not in report view. Also, you can reference the controls property more simply by using Me.ctl_label.caption = "New Caption" instead of detail.controls.item(x).caption which may become ambiguous to Access.
 

Users who are viewing this thread

Back
Top Bottom