A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query and Null values



 
 
Thread Tools Display Modes
  #1  
Old May 7th, 2007, 07:14 PM posted to microsoft.public.access.queries
dwaynesworld
external usenet poster
 
Posts: 16
Default Query and Null values

I have a query linked to a subreport that may have null entries based on
which individual's data is pulled. What I would like is to display the
subreport even if there are null values. This is my query

SELECT IIf(IsNull([Support Date]),"None",[Support Date]) AS [Date],
IIf(IsNull([Organization Name]),"None",[Organization Name]) AS [Org Name],
IIf(IsNull([Organization Hrs]),0,[Organization Hrs]) AS [Organization Hours],
IIf(IsNull([SME Activities]),"None",[SME Activities]) AS [SME Act],
IIf(IsNull([SME Hrs]),0,[SME Hrs]) AS [SME Hours],
qryIndividualBusSupportData.[Total Bus Spt Hrs]
FROM qryIndividualBusSupportData
GROUP BY IIf(IsNull([Support Date]),"None",[Support Date]),
IIf(IsNull([Organization Name]),"None",[Organization Name]),
IIf(IsNull([Organization Hrs]),0,[Organization Hrs]), IIf(IsNull([SME
Activities]),"None",[SME Activities]), IIf(IsNull([SME Hrs]),0,[SME Hrs]),
qryIndividualBusSupportData.[Total Bus Spt Hrs];


Please help
  #2  
Old May 7th, 2007, 07:47 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Query and Null values

Do you mean that there will be NO records returned for a specific individual
or do you mean that the records returned for a specific individual will
contain null values in many or all of the fields?

Your subquery should generate values for nulls in fields where a record is
generated for an individual


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"dwaynesworld" wrote in message
...
I have a query linked to a subreport that may have null entries based on
which individual's data is pulled. What I would like is to display the
subreport even if there are null values. This is my query

SELECT IIf(IsNull([Support Date]),"None",[Support Date]) AS [Date],
IIf(IsNull([Organization Name]),"None",[Organization Name]) AS [Org Name],
IIf(IsNull([Organization Hrs]),0,[Organization Hrs]) AS [Organization
Hours],
IIf(IsNull([SME Activities]),"None",[SME Activities]) AS [SME Act],
IIf(IsNull([SME Hrs]),0,[SME Hrs]) AS [SME Hours],
qryIndividualBusSupportData.[Total Bus Spt Hrs]
FROM qryIndividualBusSupportData
GROUP BY IIf(IsNull([Support Date]),"None",[Support Date]),
IIf(IsNull([Organization Name]),"None",[Organization Name]),
IIf(IsNull([Organization Hrs]),0,[Organization Hrs]), IIf(IsNull([SME
Activities]),"None",[SME Activities]), IIf(IsNull([SME Hrs]),0,[SME Hrs]),
qryIndividualBusSupportData.[Total Bus Spt Hrs];


Please help



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.