473,396 Members | 1,921 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,396 software developers and data experts.

Form Chart Expression??

1
Hello all,

Originally, my goal was only to select all records in the "forecast_info" table where the table field "f_model" was equal to the content of a form field "v_model". I was able to achieve this with the following query.
Expand|Select|Wrap|Line Numbers
  1. PARAMETERS [Forms]![vehicle_info_form]![v_model] Text ( 255 );
  2. SELECT forecast_info.f_model, forecast_info.f_year, forecast_info.f_production, forecast_info.f_sales
  3. FROM forecast_info
  4. WHERE (((forecast_info.f_model)=[Forms]![vehicle_info_form]![v_model]));
I took the results of this query (called QUERYmodelname_forecast) and displayed them in a form chart. One chart for sales (f_sales) and one chart for production (f_production). Here is the SQL behind the Production form chart:
Expand|Select|Wrap|Line Numbers
  1. TRANSFORM Sum(QUERYmodelname_forecast.f_production) AS SumOff_production
  2. SELECT QUERYmodelname_forecast.f_year
  3. FROM QUERYmodelname_forecast
  4. GROUP BY QUERYmodelname_forecast.f_year
  5. PIVOT QUERYmodelname_forecast.f_model;
Now my dilemma... now my task is to create this same graphs with the same original criteria of the first SQL. However, there are now 2 production forecasts . In other words, there will be "f_productionA" and "f_productionB". I need to apply the sum of "f_productionA" and "f_productionB" in place of "f_production" in the chart. I'm at a loss for how to go about this. I tried creating expressions and dabbled in a Lookup Wizard type field but didn't get very far with either. What do you guys suggest as the best way to accomplish this? Hopefully I explained clearly...

Thanks in advance.
Dec 11 '07 #1
1 1436
PianoMan64
374 Expert 256MB
Expand|Select|Wrap|Line Numbers
  1. TRANSFORM Sum(QUERYmodelname_forecast.f_productionA) + Sum(QUERYmodelname_forecast.f_productionB) AS SumOff_production
  2. SELECT QUERYmodelname_forecast.f_year
  3. FROM QUERYmodelname_forecast
  4. GROUP BY QUERYmodelname_forecast.f_year
  5. PIVOT QUERYmodelname_forecast.f_model;
  6.  
Jan 5 '08 #2

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

Similar topics

1
by: Jim | last post by:
I have this chart on a form. I'm trying to get this chart to render only if the user chooses to do so. This because of that the chart is quite complex and takes some time to render. I know that I...
3
by: StBond | last post by:
Hi everyone, I am new to Access and Visual Basic so things my be getting across a bit cloudy. I only started using VB for one week. I am having a little problem with the database that I am...
0
by: Heather | last post by:
I am trying to create a new report using a chart wizard with Access 97. When I try to use the Safety Audit Date as a field. I do have a Parameter Value set on this field. Between And The...
1
by: Marcin | last post by:
Hello all! I have unusual problem with a database form. I have a few forms with charts. I`ve created a module which changes me a chart title. I send an object into the module function and then I...
6
by: Thelma Lubkin | last post by:
I am trying to modify an Access form that allows a user to specify the information s/he needs from a census-type database. The form's code builds a SQL statement from the user's request, and...
7
by: vbnetdev | last post by:
My boss wants this done in a day. I would be happy with a week! Anyway, I have a dataset filled with data and need to populate an MS word chart with it when writing a report. Any tutorials or...
7
by: John | last post by:
I have a table with amongst others 2 fields: DateIn and DateOut. The idea is to make a chart that shows the average number of days it takes for a request to be answered. I'm planning to make a...
10
by: dbdb | last post by:
Hi, i create a chart in ms access based on my query, then i want my chart when is it open is only show value based on my criteria. i'll try to used it in the properties apply filter using the...
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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.