Settings Textbox in Chart

H

Harold

I have a report with a chart inserted. There is a texbox [Text Box 1] I would
like to programattically on the format event of the report.

Thanks
 
H

Harold

Progamatically set the value of the text.
I know I need to

Dim the graph as an object
Set the object
Reference the textbox = "some value"
 
D

Duane Hookom

Why does the text box have to be in the chart? Can't it be a standard text
box in front of the chart control? This would be much simpler code.

--
Duane Hookom
Microsoft Access MVP


Harold said:
Progamatically set the value of the text.
I know I need to

Dim the graph as an object
Set the object
Reference the textbox = "some value"

Harold said:
I have a report with a chart inserted. There is a texbox [Text Box 1] I would
like to programattically on the format event of the report.

Thanks
 
A

Al Campagna

Harold,
Not sure how to do that via the graph object... or if you could
do it that way.

If I need some "non-graph" values to display, I just use a regular text
control, or label, right on top of the chart, in a normally blank area.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


Harold said:
Progamatically set the value of the text.
I know I need to

Dim the graph as an object
Set the object
Reference the textbox = "some value"

Harold said:
I have a report with a chart inserted. There is a texbox [Text Box 1] I
would
like to programattically on the format event of the report.

Thanks
 
H

Harold

The reason for using a textbox within the chart is it must be printed
vertical and then rotated I think 270 degrees. The default vertical text is
unacceptable to my customer.
 
H

Harold

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim ch As Object
Set ch = Reports![Report2]![OLEUnbound0]
With ch.Axes(xlValue)
.HasTitle = True
With .AxisTitle
.Caption = "Revenue (millions)"
.Font.Name = "bookman"
.Font.Size = 10
End With
End With
End Sub
 

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