473,386 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

MSAccess-barchart-colorchange based on xaxis value in vba

16
Query ran to create barchart :Select jobname,count(*) from table 1;
In my bargraph,
X axix shows jobnames.
Y axis shows counts.
All the bars in barchart are of same color.

Currently the generated bar graph shows all jobs joba,jobb,jobc,jobd in the same color.
My requirement:


Is it possible to write some code like this to change the bar colors after the bargraph is generated by my query....

Step 1.Generate the bargraph by the query
Step 2.Change the barcolor of each bar based on the jobname value .

I have written the logic of what I want but I dont know the syntax and how to implement it .Kindly advise

With Forms!Form2.Graph1
For i = 1 to Forms!Form2.Graph1.SeriesCollection.Count
If Forms!Form2.Graph1.SeriesCollection(i).Xaxis.value = "joba"
then Forms!Form2.Graph1.SeriesCollection(i).interior.co lor = "Green"
end if

If Forms!Form2.Graph1.SeriesCollection(i).Xaxis.value = "jobb"
then Forms!Form2.Graph1.SeriesCollection(i).interior.co lor = "Blue"
end if

If Forms!Form2.Graph1.SeriesCollection(i).Xaxis.value = "jobc"
then Forms!Form2.Graph1.SeriesCollection(i).interior.co lor = "yellow"
end if

Next i

End with
Nov 15 '11 #1
0 1428

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

Similar topics

3
by: Brad Burke | last post by:
From a windows .Net app, I need to 1) check if MSAccess is already open to a certain Access application. If so, then open a form and find a certain record. 2) If not open, then open MSAccess and...
15
by: (Pete Cresswell) | last post by:
I've got a .BAT file that I use for executing various MS Access apps that I wrote way back in the days of 2.0. It's evolved over time, but it still contains a number of possible paths to...
0
by: Richard Beacroft | last post by:
Trying to write a C# Windows App to export all objects and content from 2 MSAccess 97 databases for comparison analysis. very little documentation found. Have managed to instantiate MSAccess,...
4
by: Annick Van Hoof | last post by:
Hi, I'm having my ASP.NET application hosted at a Windows 2003 server (IIS6). This works almost all the time (I have uptimes of 100% on most days), but then all of a sudden a few days in a row I...
0
by: MLH | last post by:
I've been unable to determine the correct setting to force a copy of msaccess.exe to be written to target disk during runtime installation process. It may be that the runtime installation...
2
by: reidarT | last post by:
I am making an installation program for an Access application. The application is run on both Office 2000, 2002, 2003 and soon 2007 versions of Office, When I install the application I need a...
1
by: rolandsk | last post by:
I need help to schedule a MsAccess procedure I want the procedure to run in backgrund and not the MsAccess file to be open during the time when the procedure runs. The procedure in MsAccess picks...
1
by: vikramrawal | last post by:
hi, I am using C# with MSAccess XP. I need to insert bulk of records around 10000 in MSAccess. So obviously if I inserts each record individually then it will take lot of time. By using...
1
by: NUKhan | last post by:
Hello Friends I uninstalled a trial program that also removed some shared files of MSACCESS. My program in VB6 with MSACCESS database stopped working. When I open a database table in MSACCESS, it...
0
by: bbrewder | last post by:
I am struggling with some MSAccess automation issues. Basically, we have a .Net application that uses MSAccess for reporting (legacy code). We are able to launch MSAccess fine and even work with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...

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.