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

Why Access will not display data from combined queries?

I have a main query that pulls in information and dollar values from 4 different regions that get their data from separate queries. This, in itself, runs perfectly with all data showing. Our company has added three new regions with no data (as of now) available. I have written those queries like the others and then added what I needed to to pull in the new queries/regions. When I run the main query now, nothing shows up even though there's data in the first 4 queries. How can I show this or won't it until data is available for the new regions? I've also tried with and without the WHERE clause. My code is:
Expand|Select|Wrap|Line Numbers
  1. SELECT qryProductMaster.ReportCategory, qryProductMaster.AlphaCode, qryProductMaster.ProductID, qryProductMaster.ProductDescription, qryProductMaster.ProducType, qryProductMaster.Month, qryProductMaster.Year, IIf([qryCurrentEOMProdSalesRegion1]![Region1Qty] Is Null,0,[qryCurrentEOMProdSalesRegion1]![Region1Qty]) AS Region1Qty, IIf([qryCurrentEOMProdSalesRegion1]![Region1$] Is Null,0,[qryCurrentEOMProdSalesRegion1]![Region1$]) AS [Region1$], IIf([qryCurrentEOMProdSalesRegion2]![Region2Qty] Is Null,0,[qryCurrentEOMProdSalesRegion2]![Region2Qty]) AS Region2Qty, IIf([qryCurrentEOMProdSalesRegion2]![Region2$] Is Null,0,[qryCurrentEOMProdSalesRegion2]![Region2$]) AS [Region2$], IIf([qryCurrentEOMProdSalesRegion3]![Region3Qty] Is Null,0,[qryCurrentEOMProdSalesRegion3]![Region3Qty]) AS Region3Qty, IIf([qryCurrentEOMProdSalesRegion3]![Region3$] Is Null,0,[qryCurrentEOMProdSalesRegion3]![Region3$]) AS [Region3$], IIf([qryCurrentEOMProdSalesRegion4]![Region4Qty] Is Null,0,[qryCurrentEOMProdSalesRegion4]![Region4Qty]) AS Region4Qty, IIf([qryCurrentEOMProdSalesRegion4]![Region4$] Is Null,0,[qryCurrentEOMProdSalesRegion4]![Region4$]) AS [Region4$], IIf([qryCurrentEOMProdSalesRegion5]![Region5Qty] Is Null,0,[qryCurrentEOMProdSalesRegion5]![Region5Qty]) AS Region5Qty, IIf([qryCurrentEOMProdSalesRegion5]![Region5$] Is Null,0,[qryCurrentEOMProdSalesRegion5]![Region5$]) AS [Region5$], IIf([qryCurrentEOMProdSalesRegion6]![Region6Qty] Is Null,0,[qryCurrentEOMProdSalesRegion6]![Region6Qty]) AS Region6Qty, IIf([qryCurrentEOMProdSalesRegion6]![Region6$] Is Null,0,[qryCurrentEOMProdSalesRegion6]![Region6$]) AS [Region6$], IIf([qryCurrentEOMProdSalesRegion8]![Region8Qty] Is Null,0,[qryCurrentEOMProdSalesRegion8]![Region8Qty]) AS Region8Qty, IIf([qryCurrentEOMProdSalesRegion8]![Region8$] Is Null,0,[qryCurrentEOMProdSalesRegion8]![Region8$]) AS [Region8$], [Region1Qty]+[Region2Qty]+[Region3Qty]+[Region4Qty] AS GenexQty, [Region1$]+[Region2$]+[Region3$]+[Region4$] AS [Genex$], [qryProductMaster]![Month] & '/' & [qryProductMaster]![Year] AS MMYYYY
  2. FROM ((((((qryProductMaster LEFT JOIN qryCurrentEOMProdSalesRegion1 ON (qryProductMaster.ProductID = qryCurrentEOMProdSalesRegion1.ProductID) AND (qryProductMaster.Month = qryCurrentEOMProdSalesRegion1.Month) AND (qryProductMaster.Year = qryCurrentEOMProdSalesRegion1.Year)) LEFT JOIN qryCurrentEOMProdSalesRegion2 ON (qryProductMaster.ProductID = qryCurrentEOMProdSalesRegion2.ProductID) AND (qryProductMaster.Month = qryCurrentEOMProdSalesRegion2.Month) AND (qryProductMaster.Year = qryCurrentEOMProdSalesRegion2.Year)) LEFT JOIN qryCurrentEOMProdSalesRegion3 ON (qryProductMaster.ProductID = qryCurrentEOMProdSalesRegion3.ProductID) AND (qryProductMaster.Month = qryCurrentEOMProdSalesRegion3.Month) AND (qryProductMaster.Year = qryCurrentEOMProdSalesRegion3.Year)) LEFT JOIN qryCurrentEOMProdSalesRegion4 ON (qryProductMaster.ProductID = qryCurrentEOMProdSalesRegion4.ProductID) AND (qryProductMaster.Month = qryCurrentEOMProdSalesRegion4.Month) AND (qryProductMaster.Year = qryCurrentEOMProdSalesRegion4.Year)) INNER JOIN qryCurrentEOMProdSalesRegion5 ON (qryProductMaster.Month = qryCurrentEOMProdSalesRegion5.Month) AND (qryProductMaster.Year = qryCurrentEOMProdSalesRegion5.Year) AND (qryProductMaster.ProductID = qryCurrentEOMProdSalesRegion5.ProductID)) INNER JOIN qryCurrentEOMProdSalesRegion6 ON (qryProductMaster.Month = qryCurrentEOMProdSalesRegion6.Month) AND (qryProductMaster.Year = qryCurrentEOMProdSalesRegion6.Year) AND (qryProductMaster.ProductID = qryCurrentEOMProdSalesRegion6.ProductID)) INNER JOIN qryCurrentEOMProdSalesRegion8 ON (qryProductMaster.Month = qryCurrentEOMProdSalesRegion8.Month) AND (qryProductMaster.Year = qryCurrentEOMProdSalesRegion8.Year) AND (qryProductMaster.ProductID = qryCurrentEOMProdSalesRegion8.ProductID)
  3. WHERE (((qryCurrentEOMProdSalesRegion1.Region)="1")) OR (((qryCurrentEOMProdSalesRegion2.Region)="2")) OR (((qryCurrentEOMProdSalesRegion3.Region)="3")) OR (((qryCurrentEOMProdSalesRegion4.Region)="4")) OR (((qryCurrentEOMProdSalesRegion5.Region)="5")) OR (((qryCurrentEOMProdSalesRegion6.Region)="6")) OR (((qryCurrentEOMProdSalesRegion8.Region)="8"));
Any help is greatly appreciated!
Nov 12 '10 #1
1 1037
Nevermind, I found my mistake. I have both LEFT JOIN and INNER JOIN and changed where it's all LEFT JOIN.
Nov 12 '10 #2

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

Similar topics

3
by: Guy Verville | last post by:
I'm perplexed, I have several forms that seem to be ok, but what is sent by email doesn't contain all the Carriage returns sent. The form contains many fields and is sent as follow:...
1
by: JK | last post by:
In my win form, I'm trying to display a Crystal report with the data in my dataset only but, if I follow the steps in this msdn page: ...
3
by: SS | last post by:
Hi, I don't want to refresh a web page to query and display database. I want the page shows information immediately when database changes. What kind of technology or method would be able to...
1
by: Mr Utkal Ranjan Pradhan | last post by:
Hi Friends I want to develop a windows service application, which will open a port on the machine and constantly it will listen from that port. And when any data comes to that port I want to...
2
by: Jim S | last post by:
To my surprise and chagrin, newer versions of Access have disabled the functionality that lets users change the data in linked tables that point to a range in an Excel workbook. This is "because of...
1
by: linoleum79 | last post by:
I'm getting this error: run-time error 2471 'The object doesn't contain the Automation object 'qry_prodreport_ALL.SSN." Here is the code: Private Sub GroupFooter0_Format(Cancel As Integer,...
5
by: Will | last post by:
- I know enough ASP and Access to be dangerous :) - I need to put up a data base on our web server with 3 related tables. - They will be accessed by a limited number of people. - Each user will...
2
by: malcster2 | last post by:
hello, i am a beginner to ajax. i have created a mysql database, which i would like to access from a web page. i have created 3 files, a html to display the data, a php file to extract the data,...
2
by: sumanta123 | last post by:
Dear Sir, In my develpment i am getting stuck for a senario.Kindly please help me for it. Everytime we give the request we get the response of 8 records and its corresponding value. Then next...
10
sueb
by: sueb | last post by:
I've done a lot of database work, but only scratched the surface with Access. I'm trying to write a macro (executable on-click from a button on a form) that will clear a subset of the current...
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: 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: 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
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...
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...

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.