Heather wrote:
I have created a unbound object frame and selected MS Graph and use my
table to create my graph. Note I did not use the wizard.
I open my MS Graph to change the stuff. How can I change the axises?
For example instead of the percent safety audits closed on the x axis,
i would put the safety audit date? I believe its a little different
than excel
Do you mean how do you change the field for an axis? You'd need to
change the recordset you are passing to the graph object.
If you need to swap the axis or something else at design time
double-click the MSGraph to open the MSGraph object.
I do not have alot of VBA experience.
For VBA do a search on MS's site for the MSGraph object reference help
file.
Here is some examples I've what I've used:
Function SetChartXTitle(ByRef pGraphObject As Object, pChartPeriod As
String)
DoCmd.Hourglass True
Dim MyGraph As Object
Set MyGraph = pGraphObject.Object.Application
On Error Resume Next
If pChartPeriod = "Monthly" Then
MyGraph.Chart.Axes(1, 1).HasTitle = True
MyGraph.Chart.Axes(1, 1).AxisTitle.Text = "Month"
Else
MyGraph.Chart.Axes(1, 1).HasTitle = True
MyGraph.Chart.Axes(1, 1).AxisTitle.Text = "Week Commencing"
End If
MyGraph.Update
Set MyGraph = Nothing
DoCmd.Hourglass False
End Function
Note:
You need to turn on HasTitle first
You will need to reference the MSGraph object to do the above, or just
refer to the object directly instead
I've set errors to resume next as I was getting some weird errors but
when ignored it worked... there are some "funnies" when dealing with
MSGraph.
--
regards,
Bradley
A Christian Response
http://www.pastornet.net.au/response