473,386 Members | 1,766 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.

New Data Not Carried Through All Queries

Hi. I am working in Access 2000 in Windows XP.

The problem I am having is very strange. My database has many tables and queries, but the relevant ones here are Pricing and Targets (table), Calculated Values by Product Group (query), and Savings Calculations (query). The Savings Calculations query is really the one causing trouble. I will include its SQL code here:

Expand|Select|Wrap|Line Numbers
  1. SELECT [Pricing and Targets].Plant, [Product Group Totals].Line, [Pricing and Targets].[Product Group], [Product Group Totals].[SumOfAdj Good Kgs], (([SumOfAdj Good Kgs]/[Pricing and Targets]![2006 FPE])-([SumOfAdj Good Kgs]/[Calculated Values by Product Group]![FPE]))*([Pricing and Targets]![Cost $/lb]*2.2046+[Pricing and Targets]![Conversion Cost ($/lb)]*2.2046) AS [FPE Savings], (([Product Group Totals]![SumOfAdj Good Kgs]/[Pricing and Targets]![2006 Material U])-([Product Group Totals]![SumOfAdj Good Kgs]/[Pricing and Targets]![2007 Target Material U]))*[Pricing and Targets]![Cost $/lb]*2.2046 AS [Material U Savings], [FPE Savings]+[Material U Savings] AS [Total Savings]
  2. FROM [Product Group Totals] LEFT JOIN [Pricing and Targets] ON [Product Group Totals].[Product Group] = [Pricing and Targets].[Product Group];
  3.  
As you can see from the code, it takes its values from Calculated Values by Product Group. Here's its code:

Expand|Select|Wrap|Line Numbers
  1. SELECT [Product Group Totals].Plant, [Product Group Totals].Line, [Product Group Totals].[Product Group], [Product Group Totals].[SumOfAdj Good Kgs], [Product Group Totals].[SumOfAdj Scrap Kgs], [Product Group Totals].[SumOfReclaim Kgs], [Product Group Totals].[SumOfRerun Kgs], [Product Group Totals]![SumOfAdj Good Kgs]/([Product Group Totals]![SumOfAdj Good Kgs]+[Product Group Totals]![SumOfAdj Scrap Kgs]) AS FPE, [SumOfAdj Good Kgs]/([SumOfAdj Good Kgs]+[SumOfAdj Scrap Kgs]-[SumOfReclaim Kgs]-[SumOfRerun Kgs]) AS [Material U]
  2. FROM [Product Group Totals];
  3.  
Whenever I try to open up my Savings Calculations query, it prompts me twice for "Calculated Values by Product Group!FPE" and then shows all fields correctly except those requiring this value are empty - no error even. The strange thing is that the FPE field in Calculated Values by Product Groups is perfectly fine, and that there are other fields in Savings Calculations that are calculated with fields from the same place that calculate with no problem.

I don't understand why it would do this. This is a query on a query on a query - maybe I have tried to stack too many things on top of each other. However, I never got the impression from any source that this sort of approach would be a problem. Or maybe my table names are too long? I know they're kind of wordy, but that's needed to tell them apart because I have so many that are so similar.

I will greatly appreciate any ideas on what is causing this silliness. I am all out.
Jul 11 '07 #1
4 1212
kepston
97 Expert
[Calculated Values by Product Group] is not included in your FROM clause and Access is interpreting it as a parameter to prompt for.
Jul 12 '07 #2
Thank you so much! Such a stupid mistake, but I might have been able to look at it forever without catching it.
Jul 12 '07 #3
I fixed it and it's working fine!
Jul 12 '07 #4
kepston
97 Expert
It's amazing what another pair of eyes can see!
Glad it's working.
Jul 12 '07 #5

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

Similar topics

5
by: pmud | last post by:
Hi, I need to display columns in a data grid based on 7 different queries. Now I have 32 questions: 1. Is it possble to have 1 single data adapter with 7 queries & 1 data set or do I need to...
5
by: charlies224 | last post by:
Hi, I am using SQL 2000 and has a table that contains more than 2 million rows of data (and growing). Right now, I have encountered 2 problems: 1) Sometimes, when I try to query against this...
5
by: Nick Stansbury | last post by:
Hi, Sorry for the obscure title but I'm afraid I can't think of a better way to describe what happened to one of my clerks last night. The guy was working late, made a series of changes (accross a...
4
by: intl04 | last post by:
How do I create a data input form in Access that is external to the Access database to which it's connected (if that's possible, which I believe it is)? For example, if someone clicks on an Access...
5
by: Daniel Tan | last post by:
Are there anyway to copy rows of records from one query to another query and then hide the records in source query ? Pls advise. Thanks. Regards, Daniel
2
by: Greg Strong | last post by:
Hello All, I've written code in a test database with test data. Everything seems to be working except compact database in VB code per http://www.mvps.org/access/general/gen0041.htm. The reason I...
2
by: Abhishek Srivastava | last post by:
Hello All, Suppose if I have a SQL query like select p.ID, p.NAME, p.UNIT_PRICE, o.QUANTITY from PRODUCT p ORDERS o where p.ID = X AND P.ID = O.ID Here one product can have many orders....
6
by: Steve | last post by:
I realize that this probably isn't a best practice, but I'm working with legacy code that has a query stored in one column of a table. Because the queries vary, the JSP page that selects a query...
11
by: KK | last post by:
I have an application (Developed in MS access with two MDB's one for FE and another for BE) distributed to user group. We have new requirements that needs to modify the tables structures including...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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.