473,503 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I control the bar color on a Access 97 graph with VBA?

2 New Member
I have a main form with header information about audits in my work place, and have several sub forms on a Tab control object, one of this sub forms contains a simple bar graph base on the percentage (average) of the audit result.

The row source of the graph is base on a 3 field query, one named Audit_N (text and unique identifier), PCT (percentage of grade of audit) and Sclass (Type of exam, this field is hidden and it only use to link with header information)

What I would like to know is, if it's possible to add some VBA code where I can put some validations that if PCT field value is between 1 and 50% make the bar color red, if the PCT is between 51 and 80% make it yellow, if PCT is between 81 and 99% make it green and if it's 100% make it blue. Some example data:

Audit_N PCT
0000001 100
0000002 100
0000003 50
0000004 25
0000005 50
0000006 75

Please let me know if you need for information, appreciate help, thanks.
Sep 7 '10 #1
3 1897
ADezii
8,834 Recognized Expert Expert
Expand|Select|Wrap|Line Numbers
  1. Me![<Chart Name>].SeriesCollection(<Series Number>).Interior.Color = <Color>
'as in
Expand|Select|Wrap|Line Numbers
  1. Me![Graph1].SeriesCollection(2).Interior.Color = vbBlack
Sep 7 '10 #2
alex20052003
2 New Member
Thanks for quick response, and sorry for my ignorance, but I'm not getting the SeriesCollection property from my Graph object, am I missing something?...
Sep 7 '10 #3
ADezii
8,834 Recognized Expert Expert
How, exactly, was your Graph created?
Sep 8 '10 #4

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

Similar topics

1
2926
by: Orjan | last post by:
Does anybody have a suggestion of a software or component to use if you want to display JPEG or TIFF images in a control within Access? I know that Office can do this but my customer don't want to...
5
7642
by: Steve Richter | last post by:
In my user control I want to read the ViewState dictionary of the Parent control. But this sensible idea is not permitted by the compiler: Compiler Error Message: CS1540: Cannot access...
7
8082
by: Mike Charney | last post by:
I am trying to use the calendar control in Access (Calendar Control 11.0) I have it working but for only one form. I do not know VB/VBA very well, but how can I open the calendar control, which...
1
2002
by: gazelle04 | last post by:
I want to use the RichTextBox control in access 2003. I can do that in Access 97 but not anymore in 2003 because the Common Dialog Box is now gone in Access 2003. How can I use the RichTextBox to...
1
7843
by: gazelle04 | last post by:
I've been looking for the Common Dialog Control in Access 2003 but I couldn't find it. Usually you can find it in the Insert - Active X controls menu. Does Access 2003 doesn't use Common Dialog...
0
1114
by: savas_karaduman | last post by:
Access graph only response for values , it is not responding for text which refers to value... Is it a common rule for Access ?
1
1779
by: Nigel | last post by:
Hi, We have a need to write a web control that access the local filesystem and creates a set of hyperlinks based on the files contained within a directory (this will then be used in a sharepoint...
31
2294
markryan57
by: markryan57 | last post by:
I have a VB program that acts as an interface for different functions - I am trying to run an Access program, where (for now) control is passed to Access from VB. When Access is done and the db is...
1
2237
by: nujcharee | last post by:
I am thinking about linking Oracle database to Access database but want to use Active Directory to control the access to mdb. Is this acheiveable? How?
1
2983
by: Bombus | last post by:
Hello I’m quite fresh by using Tab control in Access. I want to use Access for a tournament, with one page for each competition with 1 to hundred competitors in each run. I have done this...
0
7202
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
7086
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
7280
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,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4673
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
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
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 ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.