By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,327 Members | 1,840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,327 IT Pros & Developers. It's quick & easy.

Graph types changing between computers with the same version of access installed

P: 6
Sorry in advance if this is a silly question as I'm not a full time Access user.

I have developed a simple database to process data for an internal customer but unfortunately the graphs on the reports generated change types depending on the computer used.

The graphs are Unbound objects of the MS.Graph.Chart.8 class.

Build versions of Access are exactly the same and IT support is "claiming" the profiles are the same.

Can anyone suggest what the cause might be and if there is a work around? i.e. force the graph type etc. Interestingly, if the graph type is corrected manually on the computers which have the problem the change is not saved...
Aug 16 '07 #1
Share this Question
Share on Google+
14 Replies


Rabbit
Expert Mod 10K+
P: 12,392
I don't know if this will work but have you tried changing the type through code? Like from the On Open event of the report? I don't know if On Open will work though. Maybe On Load or something similar.
Aug 16 '07 #2

P: 6
I've tried to tie the chart down with script but haven't had much success.

I have used the following code on report open... but get a error 2771 "The bound or unbound object frame you tried to edit doesn't contain an OLE object"

Private Sub Report_Open(Cancel As Integer)

Dim GraphObj As Object
Set GraphObj = Me![OLEUnbound42].Object.Application.Chart
GraphObj.Type = xlLine

End Sub
Aug 16 '07 #3

Rabbit
Expert Mod 10K+
P: 12,392
I've tried to tie the chart down with script but haven't had much success.

I have used the following code on report open... but get a error 2771 "The bound or unbound object frame you tried to edit doesn't contain an OLE object"

Private Sub Report_Open(Cancel As Integer)

Dim GraphObj As Object
Set GraphObj = Me![OLEUnbound42].Object.Application.Chart
GraphObj.Type = xlLine

End Sub
Yeah, I was afraid On Open wouldn't work. On Open occurs before controls are loaded. See if you can find an event that happens after On Open. Like On Load or On Render.
Aug 16 '07 #4

P: 6
Changing the event to on page gives the error message.

Error 1004. Unable to set the Type property of the chart class
Aug 17 '07 #5

Rabbit
Expert Mod 10K+
P: 12,392
Changing the event to on page gives the error message.

Error 1004. Unable to set the Type property of the chart class
Did you try the On Render event?
Aug 17 '07 #6

P: 6
Sorry thats not an event option under reports or detail etc...
Aug 17 '07 #7

Rabbit
Expert Mod 10K+
P: 12,392
Hmm, what about the On Format event?
Aug 17 '07 #8

Expert 5K+
P: 8,434
Hmm, what about the On Format event?
What about using an object of the specific type, rather than a generic Object? Might make debugging slightly simpler.
Aug 17 '07 #9

P: 6
What about using an object of the specific type, rather than a generic Object? Might make debugging slightly simpler.
I would try but unfortunately I'm not that familiar with vb. Could you suggest a alteration of the code above?

Thanks
Aug 19 '07 #10

Expert 5K+
P: 8,434
I would try but unfortunately I'm not that familiar with vb. Could you suggest a alteration of the code above?
You could try As Graph.Chart and see how it goes. It looks to me as though the chart type property is called ChartType, not Type. But I'm not experienced in this area.
Aug 20 '07 #11

Rabbit
Expert Mod 10K+
P: 12,392
You could try As Graph.Chart and see how it goes. It looks to me as though the chart type property is called ChartType, not Type. But I'm not experienced in this area.
I'm not either but that makes more sense. I've never used a chart in Access but I did find it odd that it would be Type even if I didn't mention it at the time.
Aug 20 '07 #12

FishVal
Expert 2.5K+
P: 2,653
Hi, everyone.

Here is a similar thread with my clever 2 cents as well ;).

Excel Chart Object In Access Report.
Aug 20 '07 #13

P: 6
Thanks everyone for your assistance unfortunately nothing was working.

However I have now solved the problem.

I am plotting date time on the x axis of a line chart rather than a scatter plot. It turns out that some computers (with the exact same version of Access) detect this as a number and automatically convert the graph to a scatter graph (which it wont allow to be changed back).

So the problem was resolved with a work around of adding a space at the beginning of the date time label. Access then sees it as text and leaves it alone... at last!
Sep 20 '07 #14

Expert 5K+
P: 8,434
Ahah! In that case, my guess would be that the difference between PC'sis the time format. If the PC's have different time format set in their Windows regional settings, they might recognise different values as times.
Sep 21 '07 #15

Post your reply

Sign in to post your reply or Sign up for a free account.