David Emerson
newsgrps at dalyn.co.nz
Thu Nov 2 22:28:11 CST 2006
Group, Access XP ADP I have a report that has a single graph on it (Unbound Object Frame: Microsoft Graph Chart). The RowSource property is set to a sproc which has parameters. If I enter the following direct into the RowSource property the report runs fine: EXEC sprptPipeGateForecastMth 1085207198, '2006-11-01', '2007-10-01' However, I want to set the parameters based on values on a form. The help I found on the internet said that the reports OnOpen event was the place to put it so I added: Me!graGraph.RowSource = "EXEC sprptPipeGateForecastMth " & [Forms]![frmPipeWeldForecast]!cboGateIDNo & ", '" & basConvertDate(basFirstMthDay([Forms]![frmPipeWeldForecast]![txtGateMthStartMth])) & "', '" & basConvertDate(basFirstMthDay([Forms]![frmPipeWeldForecast]![txtGateMthEndMth])) & "'" When the report is run I get Runtime Error 2455 - You entered an expression that has an invalid reference to the property RowSource. I get the same error if I try in the OnOpen event of the report (this indicates that the property is not even available OnOpen): MsgBox Reports!rptPipeGateForecastMth!graGraph.RowSource I know the property exists because the following works it I put it into the report detail OnFormat event: MsgBox Me!graGraph.RowSource I have tried setting the property on the detail OnFormat event but an error comes up saying that you cant set this property after printing has started. Any guidance on what I can try?