Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am trying to count two values in one column in access 2003

Status
Not open for further replies.

jvic

Technical User
Joined
Aug 1, 2008
Messages
3
Location
US
I have a column called Accept with A's and R's in that column.I have used a crosstab query and set accept as the column heading to be able to count the A's and R's seperately on one report.
the accept column then looks like this on the report
A R Total RTs'
1 2 3
but i need it to count if one column is null.
this is what i get.
A R Total RTs'
1
I need this
A R Total RTs'
0 1 1
thanks for any help!
 
Have a look at the Nz function.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
TRANSFORM Count(dbo_WL.material) AS CountOfmaterial
SELECT dbo_WL.material, Count(dbo_WL.weld_no) AS CountOfweld_no1
FROM dbo_Welders RIGHT JOIN dbo_WL ON dbo_Welders.wl_row_id = dbo_WL.row_id
WHERE (((dbo_WL.active_flag)=1) AND ((dbo_Welders.active_flag)=1))
GROUP BY dbo_WL.material
PIVOT dbo_Welders.accept;
I have A's and R's in the accept column, if there's no data present in either column i cannot get a total
ON an Access report I am trying to find an IIf function to
calculate the total RT's which is a+r that would still give me a value even if there are no A's or vice versa.
i tried this in the total coulumn but to no avail
=IIf([R]=0,[A],[A]+[R])
I am trying to say iif r=null or blank then populate the value of a and iif a=null or blank then pop R.
and is there a way to put zero's to any null or blank value.

thanks for all your help...

DRE
 
=Nz([A],0)+Nz([R],0)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top