Access - Chart does not display - error 438 Object does not

TeeChart for ActiveX, COM and ASP
Post Reply
mechanic
Newbie
Newbie
Posts: 5
Joined: Mon Nov 22, 2010 12:00 am

Access - Chart does not display - error 438 Object does not

Post by mechanic » Thu Sep 08, 2011 11:01 am

Hi all,

I am totally desperate due to the following reason: I have created a large tool based on MS Access 2003. Everyting works fine.

However when I deploy it to my clients PC, still most of the tool works fine except for one chart: When this chart is loaded I make various settings using the following code:

Code: Select all

With Form_subFrmMgmtDashBoardShiftFwdCurve.TChartShiftCurve
    .Header.Text.Text = GBL_str_ChartMgmtDashboardShiftFwdCurve
    .Header.Visible = True
    .Axis.Bottom.Increment = .GetDateTimeStep(dtOneMonth)
    .Legend.CheckBoxes = True
    .Legend.Visible = True
    With .Axis.Bottom.Labels
      .Angle = 90
      .DateTimeFormat = "m/yy"
      .Font.Bold = False
    End With
    .Series(0).Clear 'Base Curve
    .Series(1).Clear 'Edit Curve
    .Series(0).XValues.DateTime = True
    .Series(1).XValues.DateTime = True
  End With
As soon as access hits the second line of the code, I get an error "438 Object does not support this property or method". This is extremely confusing because of two reasons:
a) it works on other PCs with exactly the same setup
b) exactly the same code works perfectly for at least 10 other charts in the same tool that are loaded without any problem.

I am using V2010.0.0.2 and the latest Office 2003 Service Pack (as well as all other service packs) are installed.

I would appreciate any hint for a solution.

Thank you and best regards
Andreas

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Access - Chart does not display - error 438 Object does not

Post by Yeray » Thu Sep 08, 2011 1:47 pm

Hello Andreas,

This is certainly quite strange.
So the problematic line seems to be the following, right?

Code: Select all

.Header.Visible = True
by default, the chart header is already visible. So, if you haven't changed it at design time, you should be able to simply comment that line.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

mechanic
Newbie
Newbie
Posts: 5
Joined: Mon Nov 22, 2010 12:00 am

Re: Access - Chart does not display - error 438 Object does not

Post by mechanic » Fri Sep 09, 2011 7:20 am

Thanks for the reply.

It is not one single line that causes the problem but all of them. It is simply that I cannot access the chart.

I have now found a workaround, that causes effort, but works: I simply deleted the chart from the form and copy pasted a "new" one from another form. Now everything works fine again.

Best regards
Andreas

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Access - Chart does not display - error 438 Object does not

Post by Narcís » Fri Sep 09, 2011 9:57 am

Hi Andreas,

Does this also happen with the Access demo provided with the TeeChart installation at C:\Program Files\Steema Software\TeeChart Pro v2011 ActiveX Control\Examples\MSOffice\VBA Access? Does this machine have the same the TeeChat .ocx registered as the other machines? You can register *.ocx as described in Tutorial 18 - TeeChart runtime installation requirements? Tutorials can be found at TeeChart's program group.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

mechanic
Newbie
Newbie
Posts: 5
Joined: Mon Nov 22, 2010 12:00 am

Re: Access - Chart does not display - error 438 Object does not

Post by mechanic » Wed Sep 14, 2011 4:26 pm

Hello Narcis,

sorry for the late reply. As I wrote I thought I found a workaround in the meantime and did not look at the post. However now I am in even deeper trouble with almost the same problem.

But first to reply to your question: The examples work perfectly fine (as do most TeeCharts).

Now the problem is: I am working on my own notebook, using Access 2007. There all charts in forms run without problems. However I have also created some reports with charts in them. These reports and the respective charts used to work. However no they do not work any longer. I get an error "438 Object does not support...".

This time, the symptoms of the problem are a bit stranger than last time: If I do open the respective reports with the charts in them standalone, everything works fine. But as soon as I start opening the reports using a button in a form the respective error occurs.

To solve the problem I have set up the respective reports completely new, but this did not help. The error still occurs.


Now I am completely confused and do not now what to do. I gave tried so many things but none worked. My latest suspect was, that the reason could be, that my database has many TeeCharts open at the same time - but also that has not been the reason as the error also occurs when I create a blank form and try open a report using a button the error still occurs.

My question is now, whether anybody has an idea for a solution or at least a workaround?

Thank you and best regards
Andreas

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Access - Chart does not display - error 438 Object does not

Post by Narcís » Thu Sep 15, 2011 1:59 pm

Hi Andreas,

The problem may lie with VBA's access method to ocxs. I'm not aware of how that might relate to the particular VBA application that you are working with but applications in Microsoft Office that use VBA to access ocx controls make a copy of the type library of the control (eg. in Excel they make .exd extension files. Typical location: C:\Documents and Settings\YourUserName\Local Settings\Temp\Excel8.0.

We have encountered version control problems in the past with these files (don't update with new versions). The problem may not lie here but there may be a file handle issue related to this and VBA's access to these files and/or the ocx, for example perhaps tying up excessive file handles (and therefore releasing them when the app is closed and restarted).
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

mechanic
Newbie
Newbie
Posts: 5
Joined: Mon Nov 22, 2010 12:00 am

Re: Access - Chart does not display - error 438 Object does not

Post by mechanic » Thu Sep 15, 2011 7:16 pm

Hi Narcis,

thanks for the hint. I also found your older posts w.r.t. this topic. It could well be that the problem is related to this. However I have not been able to detect any such files. Nor have I been able to find anything on how to establish a clean file handling (as you suggest below) to tackle the problem. Could you please give any further information, where to start?

Thanks and best regards
Andreas

p.s.: What do you mean by "don't update with new versions". Do you tell people to avoid updates? Or do you say that the problem isn't solved with never versions?

mechanic
Newbie
Newbie
Posts: 5
Joined: Mon Nov 22, 2010 12:00 am

Re: Access - Chart does not display - error 438 Object does not

Post by mechanic » Thu Sep 15, 2011 8:01 pm

Hi Narcis,

just to give an update vs. my post from a few hours ago:
I have now searched for .exd files as well as all other TeeChart related files (and file extentions) that I would suspect to saving the same purpose as .exd files do. I found some of these files and deleted them. However this didn't help in any way.

Best regards
Andreas

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Access - Chart does not display - error 438 Object does not

Post by Marc » Tue Sep 20, 2011 3:25 pm

Hello Andreas,

At the moment we're not able to reproduce the problem you've reported, if you're able to send us a sample app/mdb that fails in the way you describe it might be useful.

A quick check you could make when you first open the application on a machine that exhibits the problem would be to go to the VBA code view and check the References section under the Tools menu. See whether as a clue, there's a reference error there to the TeeChart ocx file (missing for example).

With thanks.
Regards,
Marc Meumann
Steema Support

Post Reply