Page 1 of 1

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

Posted: Thu Sep 08, 2011 11:01 am
by 16657908
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

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

Posted: Thu Sep 08, 2011 1:47 pm
by yeray
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.

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

Posted: Fri Sep 09, 2011 7:20 am
by 16657908
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

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

Posted: Fri Sep 09, 2011 9:57 am
by narcis
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.

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

Posted: Wed Sep 14, 2011 4:26 pm
by 16657908
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

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

Posted: Thu Sep 15, 2011 1:59 pm
by narcis
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).

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

Posted: Thu Sep 15, 2011 7:16 pm
by 16657908
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?

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

Posted: Thu Sep 15, 2011 8:01 pm
by 16657908
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

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

Posted: Tue Sep 20, 2011 3:25 pm
by Marc
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