Yes. The syntax looks correct. As you say, it's just the order of events that's tripping you up.
Barry
"cbjames" wrote:
[Quoted Text] > I will try by moving it to the OnOpen Event this evening when I am back at > the jobsite. So, you think the syntax is correct, only the Event was wrong? > > "Barry Gilbert" wrote: > > > I don't think you can do this in the OnPrint event. You'll have to do it in > > the OnOpen event. > > > > Barry > > > > "cbjames" wrote: > > > > > I have a Report with series of subReports. I want to change the > > > "SourceObject" of the subReports based upon a value on the main report. On > > > the Report's detail section (where the subReport reside), on the event > > > "Print" I wrote the following code. > > > > > > If Me.TrafficCount > 0 then > > > Reports!ReportName!subReportName.SourceObject = "subReportOne" > > > Else > > > Reports!ReportName!subReportName.SourceObject = "subReportTwo" > > > End If > > > > > > I must be missing the proper syntax to accomplish this task. If there is a > > > TrafficCount I want to print one subReport if the count is "0" I want to > > > print a different subReport. > > > > > > Any help would be greatly appreciated. THANK! > > > > > >
|