set chart title in code

G

Guest

I have a chart in a form using chart wizard. How can I change the Chart Title
and the Category(x)axis title in code.
These are found under Chart Options, Titles.
There is only a primary x axis.
Thanks for any help as I am well & truly stuck.
 
S

strive4peace

getting coding help for Graph objects in Access

from the design view of any module, link to the Graph Library

from the menu --> Tools, References
check Microsoft Graph #.# Object Library

from the menu --> View, Object Browser
OR
F2

On the left, you will probably see a Project window and a
Properties window below it

On the right, you will see the main Object Browser window

change <All Libraries> in the Project/Library combobox in
the upper left of the Object Browser window
to
Graph

explore each object in Classes
as you select a Class on the left, its members will appear
in the pane on the right

when you see something you want help on, press the F1 key
and switch to the Help window

You will see that Point is one of the classes you can choose
-- and you can see all the properties for the point object
listed on the right

1. choose "AxisTitle" from Classes
2. click on the "Caption" property on the right
3. press the F1 key to view help or see an example

here is an example from Help:

Caption Property Example

This example adds the title "Annual Salary Figures" to the
chart.

myChart.HasTitle = True
myChart.ChartTitle.Caption = "Annual Salary Figures"


from the object browser
1. choose "ChartTitle" from Classes
2. click on the "Caption" property on the right
3. press the F1 key to view help or see an example


Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
G

Guest

Thank you. That was really helpful.
I had already done all you suggested EXCEPT F1 for help. What a difference a
key makes.
One other thing i don't understand. The chart was working before I
referenced it. Is the reference required (other than for Object Browser to
include it)
Thanks again.
 
S

strive4peace

you're welcome ;)

I don't understand your question

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
G

Guest

In your terminology Link to the Graph Library. Before I made the link (in
references) the Graph was working. I wondered what the purpose of linking the
library was other than to use the object browser as a guide.
 
S

strive4peace

Using the Object Browser -- and being able to reference
objects in code. If you are not going to write code, you
don't need it

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top