Controlling graph in a Form

  • Thread starter darren via AccessMonster.com
  • Start date
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
 

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