Unanswered: MS Chart or Graph in Access 2003 Report
Hi - this is my first post here, but I sure hope one of you geniuses can help me...
I've been pulling my hair out trying to create a graph in a report that can be dynamically altered.
Notes: As a side note, I DO NOT WANT TO USE A BUILT-IN QUERY OBJECT. I'd prefer to do everything in code at runtime.
Problem: I cannot change the datasource because I cannot address the object in code. I continue to receive this error message:
Run-time error '2771':
The bound or unbound object frame you tried to edit doesn't contain an OLE object.
To reproduce this error, follow these steps:
Create a new report in design view
Do NOT assign a recordsource for the report
In the header, insert an object (Microsoft Excel Chart OR Microsoft Graph Chart - both exhibit the same symptoms)
Name the graph OLEGraph
Create a function with the following code:
Private Sub MakeGraph()
Dim objGraph As Object
Set objGraph = Me.OLEGraph.Object
Set the function to run at report_open
My current strategy is to try and alter the values of the datasheet and attempt "refresh" the graph. So far, I cannot get past the error message. Any attempt to set an object equal to the OLE object gives the error message listed above. I've scoured the Internet looking for ways to address the graph object, but I have never been able to do it.