473,657 Members | 2,394 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 1905
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 SeriesCollectio n 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
2938
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 install Office in his PC since he is only using this PC for this Access application. I am looking for some share- or freeware that can render various kinds of imagefiles. regards Orjan
5
7660
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 protected member 'System.Web.UI.Control.ViewState' via a qualifier of type 'System.Web.UI.Control'; the qualifier must be of type 'ASP.ItemOrderGrid' (or derived from it) Source Error:
7
8093
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 is on a form called frmcalendar, so that all I have to do is click or double click a date and the date is transferred back to the calling form? I have looked at several outside calendars but I don't want to use them. I would rather stick with...
1
2012
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 format texts inside the text box.
1
7854
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 Control anymore?
0
1122
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
1792
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 web part). Don't know a lot about this stuff, but have written an ActiveX control that, when used on a Windows form, works correctly, however when used on a web application gives the following error:
31
2325
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 closed - the VB app cannot open another instance of Access (which is necessary). How do I launch Access from VB and pass control to Access?
1
2251
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
2992
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 manually, and it works fine. However I would do it dynamic by reading the competitions from a table since it differs from each tournament. Bombus
0
8420
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6176
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4173
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2743
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 we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.