By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,282 Members | 1,569 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,282 IT Pros & Developers. It's quick & easy.

MS Graph in Access 97

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.