473,486 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Graph Chart using Access 2k3 with 2k format

I'm trying to follow the examples in VBAGRP9.CHM and/or VBAGR10.CHM with no
success. I'm trying to Chage the Legend Colors based on Content so that I
can establish a certain color format on Content. The Chart will reside on a
Report and possibly converted to a 2002 format. Currently I'm using the
following code with Microsoft Graph 11.0 Object Library referenced.:

With myChart.Legend
For i = 1 To .LegendEntries.Count
.LegendEntries(i).Font.ColorIndex = 5
Next
End With

The Errors that I'm getting are either:

2771 The bound or unbound object frame you triedto edit doesn't contain an
OLE object.

or

438 Object doesn't support this property or method.
Please help me Master(s), so that I can justify my existance.
Nov 13 '05 #1
2 3107
I can't believe that someone hasn't figured this out! After a long
afternoon of playing around, I discovered that Graph.Chart 8.0 doesn't
like a Record Source on the Report. If you're assigning a Record
Source in the OnOpen Event...Remove that to. Everything works after
that.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
1 On Error GoTo Err_dF
5 Dim chr As Graph.Chart
10 Dim j As Integer
15 Dim X As String
20 Set chr = myChart.Object
25 With chr.Legend
30 j = .LegendEntries.Count
35 For i = 1 To j
40 X = .Application.DataSheet.Cells(i + 1, 1)
45 Select Case X
Case "Actual"
50 .LegendEntries(i).LegendKey.Interior.Color = 0
Case "PM/Engr."
55 .LegendEntries(i).LegendKey.Interior.Color =
32768
Case "Equip"
60 .LegendEntries(i).LegendKey.Interior.Color =
65535
Case "Matl"
65 .LegendEntries(i).LegendKey.Interior.Color =
16711680
Case "Merit"
70 .LegendEntries(i).LegendKey.Interior.Color =
39423
Case "JEG_SC"
75 .LegendEntries(i).LegendKey.Interior.Color =
255
Case "BPMISC"
80 .LegendEntries(i).LegendKey.Interior.Color =
16763904
Case "BP_SC"
85 .LegendEntries(i).LegendKey.Interior.Color =
13209
Case "Conting"
90 .LegendEntries(i).LegendKey.Interior.Color =
16751052
Case "UN"
95 .LegendEntries(i).LegendKey.Interior.Color =
RGB(255, 255, 255)
100 End Select
105 Next
110 End With
Exit_dF:
115 Exit Sub
Err_dF:
120 If Err.Number = 1004 Then
125 Resume Next
130 Else
135 MsgBox Err.Number & " " & Err.Description & chr(13) &
chr(10) & "Detail Format Line No: " & Erl
140 Resume Exit_dF
145 End If
End Sub
Da**********@SBCGlobal.Net (Dave) wrote in message news:<8c*************************@posting.google.c om>...
I'm trying to follow the examples in VBAGRP9.CHM and/or VBAGR10.CHM with no
success. I'm trying to Chage the Legend Colors based on Content so that I
can establish a certain color format on Content. The Chart will reside on a
Report and possibly converted to a 2002 format. Currently I'm using the
following code with Microsoft Graph 11.0 Object Library referenced.:

With myChart.Legend
For i = 1 To .LegendEntries.Count
.LegendEntries(i).Font.ColorIndex = 5
Next
End With

The Errors that I'm getting are either:

2771 The bound or unbound object frame you triedto edit doesn't contain an
OLE object.

or

438 Object doesn't support this property or method.
Please help me Master(s), so that I can justify my existance.

Nov 13 '05 #2
Dave wrote:
I'm trying to follow the examples in VBAGRP9.CHM and/or VBAGR10.CHM with no
success.


Dave, I'm sorry I'm not much of any help, but I did do a considerable
amount of graph manipulation in A97 quite some time ago and will be
doing so in the near future with A2003. Can you tell me where these
..chm files came from? I don't even know what .chm signifies.

Thanks in advance.

--
Tim - http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7911
by: JD Kronicz | last post by:
Hi .. I have an issue I have been beating my head against the wall on for some time. I am trying to use late binding for MS graph so that my end users don't have to worry about having the right...
3
4565
by: Jeff | last post by:
Hi I have a report with a graph on it and want to change the minimum and maximum values for the value axis when it is previewed. This can't be done by adding code in the Open event as once the...
6
2235
by: David W. Fenton | last post by:
Is MS Graph really completely useless in Access 97? I uninstalled and re-installed to get the Office 97 version of MS Graph, but I see no way whatsoever to insert dynamic data into the chart....
2
2813
by: mark | last post by:
I've got an 83-page report which contains an Microsoft Graph 8 Chart, but the report takes FOREVER to format, probably because the row source is a bit complex: TRANSFORM...
1
5929
by: PeteCresswell | last post by:
The following code is working for everything but the column formatting on lines 9191 and 9192. It doesn't trap out - just doesn't "take". "fChart" is a pointer to the open form that has the...
2
3739
by: smith.mariya | last post by:
hi, i am mariya. i am working on vb.net. i have created the powerpoint addin. i have inserted the chart on the slide through vb.net code. now, i want to remove the gridlines on the chart and want...
1
2262
by: dosingh | last post by:
i've put this page together using asp, html, javascript amd flash. java passes a number of variables over to the flash file but the flash graph does not appear. The error which appears is...
3
4687
by: The Frog | last post by:
Hi guys, I have never touched really on this area before with forms and reports, and now I would like to be able to incorporate some graphs / charts for a new little app I am building, and I...
2
2946
by: TGG61 | last post by:
I have an Access 2000 query that asks the user for the start date & end date for a report or chart. In the Access report, I can display the start & end dates entered in the query in the header of the...
0
7099
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7319
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.