On Mon, 18 Apr 2005 17:10:09 +0200, Zlatko Matić wrote:
I tried to set RowSource of the MS Graph nested inside a report,
programatically .
I put Me.NameOfTheGra ph.RowSource="N ameOfTheQuery" on the Open Event of the
report, but an error occurs :" Run-time error '2455': You entered an
expression that has an invalid reference to the property RowSource".
What's wrong ?
Thanks.
You cannot set the row source of a graph while the report is running.
You can set the row source just before running the report, using code.
DoCmd.OpenRepor t "ReportName ", acViewDesign, , , acHidden
Reports!ReportN ame!GraphContro lName.Rowsource = "Select etc. etc.;"
DoCmd.Close acReport, "ReportName , acSaveYes
DoCmd.OpenRepor t "ReportName ", acViewPreview
Try the above and see if it works for you.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.