Connecting Tech Pros Worldwide Help | Site Map

Subquery Fields Null

  #1  
Old November 13th, 2005, 12:36 PM
Dan
Guest
 
Posts: n/a
I am linking two queries in Access. One has data in several fields
such as: Name, Year, Amount, CumTotal1, CumTotal2 where the cumulative
total fields are two subqueries generating cumulative totals based on
the Name, Year, and Amount (e.g. (select sum([Amount]) from Query1 as
q1 where q1.name = query1.name and q1.year <= query1.year)). When I
run Query1 the cumulative totals show up. However, when I inner join
Query1 on Name to another query (this second query has been desinged to
select only the names I want to use) the values from the two cumulative
total fields show up blank. I'm using Access 2002 file format, and I
have sucesfully joined tables with subqueries at other times. Any
thoughts on what I'm missing would be appreciated.--Dan

  #2  
Old November 13th, 2005, 12:38 PM
Bas Cost Budde
Guest
 
Posts: n/a

re: Subquery Fields Null


Put Name inside square brackets because it may be trigger a Reserved
Term Confusion.

Dan wrote:
[color=blue]
> I am linking two queries in Access. One has data in several fields
> such as: Name, Year, Amount, CumTotal1, CumTotal2 where the cumulative
> total fields are two subqueries generating cumulative totals based on
> the Name, Year, and Amount (e.g. (select sum([Amount]) from Query1 as
> q1 where q1.name = query1.name and q1.year <= query1.year)). When I
> run Query1 the cumulative totals show up. However, when I inner join
> Query1 on Name to another query (this second query has been desinged to
> select only the names I want to use) the values from the two cumulative
> total fields show up blank. I'm using Access 2002 file format, and I
> have sucesfully joined tables with subqueries at other times. Any
> thoughts on what I'm missing would be appreciated.--Dan
>[/color]

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
For human replies, replace the queue with a tea

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
'NULL' value can not replaced in sub query prabirchoudhury answers 0 July 29th, 2009 03:56 AM
Conditional "Is Null" Query Criteria veaux@aol.com answers 1 June 27th, 2008 08:26 PM
UPDATE qry Specifying Multiple Fields in Nested SELECT subqry P3Eddie answers 9 August 15th, 2007 02:50 AM
Use a subquery to pull particular records including null fields RiesbeckP@aetna.com answers 1 November 13th, 2005 11:03 AM