Article ID: 186721
Article Last Modified on 1/23/2007
186855 ACC97: Microsoft Access 97 Sample Graphs Available in Download Center
Command Button
--------------
Name: Title
Caption: Toggle Caption
Sub Title_Click()
'-------------------------------------------------------
' Show or hide the title by using the Not Operator to
' reverse the state of the HasTitle property
'-------------------------------------------------------
Me!Graph1.Hastitle = Not Me!Graph1.Hastitle
' If the graph has a title, set the Caption to something
If Me!Graph1.Hastitle Then
Me!Graph1.ChartTitle.Text = "Sample Title"
End If
End Sub
Option Explicit
Command Button
----------------------
Name: Legend
Caption: Toggle Legend
Sub Legend_Click ()
'-----------------------------------------------------------
' If the legend is not present, show it; otherwise, hide it.
' Use the Not Operator to reverse the state of the HasLegend
' property of the graph.
'-----------------------------------------------------------
Me!Graph1.Haslegend = Not Me!Graph1.Haslegend
End Sub
Option Explicit
128364 Microsoft Graph VBA Help File Available in Download Center
Additional query words: link embed
Keywords: kbhowto KB186721