D
darren via AccessMonster.com
Hi, I have a graph in a form and cannot format the data table. I have seen
the code below, but this is for the On Print event of a Report. How can I
make this work within a form? Which of event should I use. I have a tried a
few and though the code is triggered the desired result is not achieved.
On Error Resume Next
Dim objGraph As Object
Dim objDS as Object
Set objGraph = Me!TheNameOfYourGraph.Object
Set objDS = objGraph.Application.DataSheet
'Singe decimal place, 200 data points
'Format is the same as Excel VBA
objDS.Range("A1:A200").NumberFormat = "#.0%"
objGraph.Refresh
DoEvents
Set objGraph = Nothing
P.S. Am i correct that for currency I would use "Currency" or "£#" or "$#".
Thanks
the code below, but this is for the On Print event of a Report. How can I
make this work within a form? Which of event should I use. I have a tried a
few and though the code is triggered the desired result is not achieved.
On Error Resume Next
Dim objGraph As Object
Dim objDS as Object
Set objGraph = Me!TheNameOfYourGraph.Object
Set objDS = objGraph.Application.DataSheet
'Singe decimal place, 200 data points
'Format is the same as Excel VBA
objDS.Range("A1:A200").NumberFormat = "#.0%"
objGraph.Refresh
DoEvents
Set objGraph = Nothing
P.S. Am i correct that for currency I would use "Currency" or "£#" or "$#".
Thanks