Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show % values in chart data table

Status
Not open for further replies.

aliendan

Programmer
Jun 28, 2000
79
US
I hope someone can help me with this one. I want the data table in a chart show % values with one decimal place. I formatted the source query field to percent with one decimal, I formatted the chart datasheet field the same and I added the following code to the On Print event for the Detail section of the report where the chart resides:

On Error Resume Next
Dim objGraph As Object
Dim objDS As Object
Set objGraph = Me!rptBttryPrdVsTstStsWSA.Object
Set objDS = objGraph.Application.DataSheet
objDS.Range("C1:C11").NumberFormat = "#.0%"
objGraph.Refresh
DoEvents
Set objGraph = Nothing

But to no avail. This code I got from another forum and it seemed to work for them but not for me. For instance I want to display 14.8% in the data table but with all I did it still displays 0.148412415 . Does anyone have any other ideas on this? "Thank you" in advance.

Dan

Dan Rogotzke
Daniel_Rogotzke@oxy.com
 
I typically don't use chart data tables. Have you considered using a subreport instead? Your subreport would have the same Record Source as the Row Source of your chart. The subreport provides a ton more flexibility in formatting.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top