473,326 Members | 2,337 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,326 software developers and data experts.

Creating a Dynamic Chart in a Form

Here is my question, and really, all I would like is to know is if 1) Is this possible? and 2) What is some good reading to get me up to speed on this subject.

I have a form that draws its records from a table. It's fields consists of a PK(autonumber), a projectID (links to a project), a month ending date (this is the last day of the month, and a volume (the volume that is being done in the month.

The form acts like a crosstab query and displays the months as column headings and then grabs the volumes that are attached to those months. I have the form set up right now to only display one year at a time.

I am wondering if there is any way to have a graph dynamicaly draw the current year ONLY. That is, set the graphs X axis to the months of the year and dynamicaly draw in the values from the texts boxes on the form. Right now I have the graph for the entire projectID.

I have attached a sample of what I am trying to do, please ask if anything needs to be clarified or explained further.

Thanks,

Blake Rice
Attached Files
File Type: zip Sample.zip (53.0 KB, 691 views)
Jun 27 '11 #1
3 12037
Ok, so I have figured out how to make the chart on the form dynamic, so that it reflects the data that is displayed on the form. Who knew that the chart object would have a .rowsource property? Change that in VBA and voila.

My only problem now is that some years do not have full backlog dates, that is that some months do not show up on the chart when there isn't corresponding values in the table. The way that I would like to see it is that the months Jan - Dec always show up on the chart where the years just change depending on what the current year is and that the values get plotted on the chart IF they exist.

I want to think that this is an easy problem to fix and I would love ANY help that those out there are willing to give.

I have attached the form and underlying table, the buttons under the year move through the years and the values in the table.

If you have any other questions or if this needs to be explained some more please ask.

-Blake
Attached Files
File Type: zip Sample_2.zip (49.5 KB, 795 views)
Jun 29 '11 #2
Ok, here is the code. Is there anyway within this SQL to make it so the Graph always shows Jan - Dec even if there isn't a value to plot?

Expand|Select|Wrap|Line Numbers
  1. Me.grphBacklog.RowSource = "SELECT (Format([MonthEnding],""MMM 'YY"")) AS Expr1, Sum(Backlog.Volume) AS SumOfVolume " & _
  2.                         "FROM Backlog " & _
  3.                         "WHERE (Backlog.MonthEnding) BETWEEN #" & DateSerial(CInt(Format(Me.lblThisYear.Value, "yyyy")), 1, 1) & "# AND " & _
  4.                         "#" & DateSerial(CInt(Format(Me.lblThisYear.Value, "yyyy")), 12, 31) & "# " & _
  5.                         "GROUP BY (Year([MonthEnding])*12+Month([MonthEnding])-1), (Format([MonthEnding],""MMM 'YY""));"
Jun 29 '11 #3
I still haven't been able to figure this one out, any help would be much appreciated.
Jul 13 '11 #4

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

Similar topics

11
by: propizzy | last post by:
Appreciate any help!!! PROBLEM: I have this form that allows the user to dynamically create additional fields (see javascript code bellow). I am trying to retrieve the values entered into these...
2
by: Patrick | last post by:
I want to define a set of web-form templates in XML and render the equivalent web-form with ASP.NET, then process any input server controls on the form. Reading the XML file from Page_load is...
1
by: code | last post by:
Hi Grp http://www.books-download.com/?Book=1493-PHP+Hacks+%3a+Tips+%26+Tools+For+Creating+Dynamic+Websites+(Hacks) Description Programmers love its flexibility and speed; designers love its...
13
by: salad | last post by:
Operating in A97. I didn't receive much of a response conserning Pivot tables in Access. Pivot tables are nice, but a CrossTab will work for me too. Using a Pivot table, one is actually...
6
by: Bora Ji | last post by:
Please help me to creating dynamic VARIABLE in java, with predefined name.
8
shane3341436
by: shane3341436 | last post by:
I heard that ajax is very powerful for creating dynamic web pages. Is there any way to create a dynamic select field. Like I have two select fields and take data from the database. When choosing a...
2
by: vinceboy | last post by:
Hi anybody. I am newbie here and would like to know that how can I validate both drop down menu and radio button from a dynamic display form.Something went wrong with my script.The radio button is...
0
by: asifu9 | last post by:
Hello all, I am new to MS Access VBA 2007, i need help on how to open a chart form in switchboard. SwitchBoard having options to open a form in Add mode and edit mode, in both of...
1
by: TTYY | last post by:
Is there a way to print a report with all of one person's info, not in chart form?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.