I have an x-y graph on a form that gets its data from a query. The query pulls five records of data from a table. So there are five data points I want to have displayd on the graph. I got the graph to work properly except it only displays four points! The first data point is not displaying.
I tried to set the datasheet in the graph to "ignore" the first row, as I noticed immediately that it does not have a number reference....I am assuming that is the problem.
Is there a method to resolve this easily? I assume that it must be done with vba. My data is used by the graph in two columns...first column is the X value, second column is the Y value.
I'm trying to have a linked Excel chart in Access form. What I've done so far is create a chart in Excel and Paste Special>>Linked into Access.
I also have code inside Excel that will update chart data, it works fine.
Then I have code in Access that calls the code in Excel to update the data.
The data gets updated fine and the chart in Excel gets updated but the chart in Access only gets updated if I close and open the form again.
Here is the code that will update the Excel Data
Public Sub Import_VRSS_Graph_Data(strDayType As String, strTimeBand As String, strEntrance As String, Ws As Worksheet) ' Create a connection object. Dim cnPubs As ADODB.Connection Set cnPubs = New ADODB.Connection ' Provide the connection string. Dim strConn As String
i have a table with 7 columns. Assume THE columns are a,b,c,d,e,f,g. In this table there is only one row and each column is given a number value. For example, a is 1, b is 5 and so forth. Can i make a pie graph in access with these 7 labels, and show there totals in the graphs?
I have been struggling with modifying a graph that I have made into a counting graph, I have wasted over 4 hours trying to do this modification unsuccessfully.
I am attaching 4 pictures, The Depth_Ranges Table Visual is the query which creates graph 1 you can also see in the additional attached picture of the design view the code that creates this graph 1.
Now I need to add a field in the Design view of that query in order to have a result of the graph 2 that you see in the picture.
Basically, creating counter that will count how many values are in each bin labels that you can see on the picture of graph 2.
I am having a problem with my access graph, I have a combobox and based on that selection from the combobox I need it to display on the graph. It works fine ,but once i change the query to what i want to be displayed on the graph it doesnt show the bars , just the information .
When I make the column graph the data seems to not be in any order. The report is in order by the number of days in ascending order.
How can I have the columns with the largest number show up first and the columns get smaller. I would like the largest column all the way to the left, proceeding the next one in size so it goes from largest to smallest.
We have a daily task that generates a dozen graphs. Each day, we want to display the graphs on a large screen monitor for public viewing, preferably as a slideshow. Currently the graphs come from Access 2003. How can we automate getting the graphs in a format that will work with PowerPoint or some other slideshow software?
I am trying to change the fill colors on a bar graph based on the value the bar graph has.
the bar graph gives the percentages of tasks and I would like to have it so that the fill color of a bar is based on the a set of values for the percentage... so if the percentage of task A is between 0 and 25% it should be red, if percentage of task A is between 25% and 50% it should be yellow, and if the percentage of task A is between 50% and 100% it should be green.
this is the query that the graph is based off of Code:SELECT TEST_RawData.DeliverableDesc, FormatPercent(Avg(PercentComplete)) AS CurrentProgressFROM TEST_RawDataGROUP BY TEST_RawData.DeliverableDesc;
This is the data table of the graph DeliverableDesc | CurrentProgress test 1 | 82.64% test 2 | 55.75% test 3 | 30.09% test 4 | 13.00%
now I have looked at this http://support.microsoft.com/?kbid=200527 and tried to remodel it to my situation but have some concerns. This is what I have so far vba Code: Original - vba Code Private Sub Report_Open(Cancel As Integer) Dim chtObj As Object, strRowSource As String Dim rsRowSourceFiltered As Recordset Dim i As Integer, j As Integer Dim strArrTaskPercents() As String Dim intArrTaskColors() As Integer ' The color integers are those that are used by the QBColor function to assign point colors. Const cBadProgress_Red = 4 Const cOkayProgress_Yellow = 6 Const cGoodProgress_Green = 2 ' Place all the task percents values into an array. ReDim strArrTaskPercents(3) strArrTaskPercents(1) = "10.00%" strArrTaskPercents(2) = "25.00%" strArrTaskPercents(3) = "50.00%" ' Place the task color values into an array. ReDim intArrShipperColors(3) intArrTaskColors(1) = cBadProgress_Red intArrTaskColors(2) = cOkayProgress_Yellow intArrTaskColors(3) = cGoodProgress_Green Set chtObj = Me!Graph10.Object strRowSource = "SELECT TEST_RawData.DeliverableDesc, FormatPercent(Avg(PercentComplete)) AS CurrentProgress FROM TEST_RawData GROUP BY TEST_RawData.DeliverableDesc;" Set rsRowSourceFiltered = CurrentDb.OpenRecordset(strRowSource, dbOpenSnapshot) ' Check to see if the filtered recordset has any records. If rsRowSourceFiltered.BOF And _ rsRowSourceFiltered.EOF Then MsgBox "There are no records to chart." Exit Sub End If ' Loop through the recordset containing the chart's filtered RowSource. rsRowSourceFiltered.MoveFirst i = 0 While Not rsRowSourceFiltered.EOF ' Index i synchronizes the Points collection index with the current recordset row. i = i + 1 ' Loop through the task percents array and look for a match with the field names of the chart's filtered RowSource. For j = 1 To UBound(strArrTaskPercents) ' 1-based ' The first field in the recordset contains the task percent. Some tasks may not be in the filtered recordset. If rsRowSourceFiltered.Fields(0).Value = strArrTaskPercents(j) Then ' Because every task has a corresponding color, the arrays strArrTaskPercents and intArrTaskColors always contain the same number of elements. Assign the color of the chart column, bar, slice etc. Graph10.SeriesCollection(1).Points(i). _ Interior.Color = QBColor(intArrTaskColors(j)) End If Next rsRowSourceFiltered.MoveNext WendEnd Sub Private Sub Report_Open(Cancel As Integer) Dim chtObj As Object, strRowSource As String Dim rsRowSourceFiltered As Recordset Dim i As Integer, j As Integer Dim strArrTaskPercents() As String Dim intArrTaskColors() As Integer ' The color integers are those that are used by the QBColor function to assign point colors. Const cBadProgress_Red = 4 Const cOkayProgress_Yellow = 6 Const cGoodProgress_Green = 2 ' Place all the task percents values into an array. ReDim strArrTaskPercents(3) strArrTaskPercents(1) = "10.00%" strArrTaskPercents(2) = "25.00%" strArrTaskPercents(3) = "50.00%" ' Place the task color values into an array. ReDim intArrShipperColors(3) intArrTaskColors(1) = cBadProgress_Red intArrTaskColors(2) = cOkayProgress_Yellow intArrTaskColors(3) = cGoodProgress_Green Set chtObj = Me!Graph10.Object strRowSource = "SELECT TEST_RawData.DeliverableDesc, FormatPercent(Avg(PercentComplete)) AS CurrentProgress FROM TEST_RawData GROUP BY TEST_RawData.DeliverableDesc;" Set rsRowSourceFiltered = CurrentDb.OpenRecordset(strRowSource, dbOpenSnapshot) ' Check to see if the filtered recordset has any records. If rsRowSourceFiltered.BOF And _ rsRowSourceFiltered.EOF Then MsgBox "There are no records to chart." Exit Sub End If ' Loop through the recordset containing the chart's filtered RowSource. rsRowSourceFiltered.MoveFirst i = 0 While Not rsRowSourceFiltered.EOF ' Index i synchronizes the Points collection index with the current recordset row. i = i + 1 ' Loop through the task percents array and look for a match with the field names of the chart's filtered RowSource. For j = 1 To UBound(strArrTaskPercents) ' 1-based ' The first field in the recordset contains the task percent. Some tasks may not be in the filtered recordset. If rsRowSourceFiltered.Fields(0).Value = strArrTaskPercents(j) Then ' Because every task has a corresponding color, the arrays strArrTaskPercents and intArrTaskColors always contain the same number of elements. Assign the color of the chart column, bar, slice etc. Graph10.SeriesCollection(1).Points(i). _ Interior.Color = QBColor(intArrTaskColors(j)) End If Next rsRowSourceFiltered.MoveNext WendEnd Sub
these are my concerns - first is the strucutre and syntax for the above Sub Report_Open good? -second how do I match percents the query is outputting to the table to the percents I write in the strArrTaskPercents array -third how would I change how it matches percents so that it matches a range of percentages, like the first example if something is between 50% and 100% it should be green.
if anyone can directly help with the code, or indirectly point me to some examples, articles, etc. that might help me it would be greatly appreciated.
A while back a colleague at work (who has since left my company) showed me an example of a graph within a Data Access Page in the Microsoft Northwind database. The Northwind database that I've downloaded doesn't contain such an example. Does anyone know of a Northwind DB with an exmaple of a graph embedded into a Data Access Page?
I am trying to export the result of a query to a specific Excel sheet where I have a dynamic graph. The results are exported on a monthly basis, so I am just adding the data, and the graph reflects that. Now, I can export to excel easily enough by using the Transfer Spreadsheet method, but this creates a new worksheet, thus destroying my lovely graph. I have even tried the Output Query method, but to no avail. Is there any way I can export to excel and keep the graph intact?
So as you can see, my graph is actually confusing my TOP record with the title and that's why it's not showing. So how can I fix this?
On a sidenote: As you can see, I didn't work on 11/11 & 12/11 but my graph is still showing those dates but of course with value 0. How can I leave out dates where I created no orders?
Hello :D I have an issue with Access I was hoping someone could help me on. So I have this pie chart graph with 3 sections, colored red for East, Green for West, and Blue for North. Now the problem is that sometimes, the data that I pull in doesn't have a "West" and therefor doesn't add it to the chart. This, however, throws the coloring scheme off as it assigns colors so that 1 is red, 2 is green, 3 is blue rather than East is red, West if Green, and North is Blue. I'll provide some images so it'll be easier to understand. (Clickable thumbnails)
I would like to display a graph in a form along with the fields from a table. The user will be allow to update the table and the graph will be updated. So far I am able to display the graph on the report but I cannot find a way to display the graph on the form. Can somebody help? Thanks in advance.
Here is the breakdown. I have a number of tables within a database, I have a main screen as to pick the required table I want to display in either tabular or graph format, the table works. I have created a graph and am trying to get the code or row source in the properties to look at the VBA I have written.
Any ideas please?
It’s something to do with the row source type. If it were a function, I would just put the function name there. It’s a private sub.
I currently have a form from which users can select their name and it will open a report listing events they have attended. It does this through a macro running a filter. What I would like to happen is the same criteria that is being used to filter the report be used as criteria for a different (unfortunately) query that can then generate a graph in the report as well.how to get the criteria into the second query for the graph.
:confused: I wish to construct a form that displays a graph showing the monthly sales totals year on year. In this way - I will be able to see quite easily how the present monthly income compares to previous years.
Therefore, each year will have its own data series on the graph... the problem I have is that I wish the graph to automatically recognise the roll-over to the next year thereby creating the next series for that year. This would mean having the months Jan-Dec on the X axis and the income scale as the Y axis. Each data series representing the year. Otherwise, the alternative is to manually change the underlying datasource every year to include .... has anyone done anything similar to this that they would be willing to share please?
I currently have a Pareto graph created by a query, that counts occurence and then uses the Dsum function to create the cumalative %. The function is as follows:
This is as per MS article: http://support.microsoft.com/kb/208373
Now this is OK and is as per the MS article but if you have counts that are the same, it just give the same cumalative % for each one that is the same. Please see attached image for an example of what this query produces.