Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 328
  • Last Modified:

Microsoft Chart 6.0 in Access 2000 OLE Error

I have created a report and placed a Microsoft Chart 6.0 ActiveX object in it, and I was attempting to link the chart to a query result set...
I've gotten to the following point with my code:
    Dim objChart As Chart
    Set objChart = Me.MyChart.Object.Application.Chart
    objChart.DataTable = "Qry Milestones by Program 04"


And on the set objChart line I keep getting an error message that states:
Run-time error '2771':

The bound or unbound object frame you tried to edit doesn't contain an OLE object


Please help - The query results contain data categorized and totaled by month, and I need to use this control so that I can have a combonation chart with bars, stacked bars, lines, and area graphs for different series of data.

Thanks!
0
HSdba
Asked:
HSdba
  • 2
  • 2
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Is this on your development machine, on an enduser machine? Do you have the licensing necessary to use the control?

If this is on an enduser machine, you'll have to make sure that you correctly deploy the control to all users.
0
 
HSdbaAuthor Commented:
The .mdb file is shared via a network drive by 6-12 users.  I am working with a separate copy of it right now for development purposes.  As for licensing, how would I figure out if my client has it?  I didn't actually design the database itself - I "inherited" it, but the control is available on the list of "other tools"  
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You can write a routine that would check for the file (it's named "mschart.ocx", btw), but this is a very tedious process and unless you're VERY sure of what you're doing you could end up breaking existing applications. Generally your install program would do this ... I use Wise, but any commercial installer can do this for you.

BTW, this control is part of VB6 ... which means there's NO support for it in the MSAccess environment, and Access in VERY picky about ActiveX controls. There may also be dependancies required for this control (i.e. other files which must be installed for it to work correctly) ... I'm not sure as I don't use it. If you don't have VB6 installed on your machine, then you don't have design-time license to use this control ... therefore you'll get the error you mention. The fix is to either (a) install VB6 on your machine or (b) do away with the reference or (c) change to a 3rd party control which is designed to work in the Access environment. There are some 3rd party chart controls which profess to work with Access, but I haven't tried them.
0
 
HSdbaAuthor Commented:
Thanks - I figured out how to do it using Graph 2000
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now