468,484 Members | 1,543 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,484 developers. It's quick & easy.

MS Graph in Access 97

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
I do not have alot of VBA experience.

Nov 29 '05 #1
1 2512
Br
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
Nov 29 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

25 posts views Thread by Magnus Lie Hetland | last post: by
6 posts views Thread by David W. Fenton | last post: by
8 posts views Thread by Jef Driesen | last post: by
12 posts views Thread by Nathan Harmston | last post: by
2 posts views Thread by savas_karaduman | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by theflame83 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.