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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NZ function in Crosstab Query 2

Status
Not open for further replies.

Melagan

MIS
Nov 24, 2004
443
US
Greetings,

Probably a simple one here, but the answer is escaping me at the moment. I'm just trying to use the NZ function to fill in null values with zeros on my xtab query.

The only thing it seems to be doing, however, is losing the currency format in all of the fields.

Code:
TRANSFORM nz(Sum(qr.EOTotal)) AS [The Value]
SELECT qr.[Sales Rep], qr.rMonth
FROM [qryRep-EO] AS qr
GROUP BY qr.[Sales Rep], qr.rMonth
PIVOT qr.First_Last;

The EOTotal field is currency formatted. For some reason, the NZ function is converting those cells to strings, thereby replacing any EOTotal cells that are null with a zero length string instead of a zero currency value. What gives?

Code:
TRANSFORM nz(Sum(qr.EOTotal),0) AS [The Value]

..yields the same result. Any help is greatly appreciated, and please pardon my newness with crosstab queries =)



~Melagan
______
"It's never too late to become what you might have been.
 
And this ?
TRANSFORM CCur(Nz(Sum(qr.EOTotal),0)) AS [The Value]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
hehe...yeah that works =) Thanks again PHV! Have a star for the lightning-fast response.


~Melagan
______
"It's never too late to become what you might have been.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top