By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,365 Members | 3,180 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,365 IT Pros & Developers. It's quick & easy.

Crosstab Query

P: n/a
How to set the blank cell to 0 when a crosstab query is created?

Thanks.
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
When creating your crosstab query, rather than use the field name for the
field(s) that could have Null values, enter an expression like this for the
field in the query grid:
=IIF(IsNull([MyFieldname]),0,[MyFieldName])
When you press Enter after typing this in, ExprX will appear on the left of
the equal sign. Highlight the ExprX and enter some descriptive name for the
query field.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Sherman H." <sh***@charter.net> wrote in message
news:10*************@corp.supernews.com...
How to set the blank cell to 0 when a crosstab query is created?

Thanks.

Nov 13 '05 #2

P: n/a
Use Nz().

Switch the query to SQL View, and change:
Sum(Amount) AS SumOfAmount
to:
Nz(Sum(Amount),0) AS SumOfAmount

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Sherman H." <sh***@charter.net> wrote in message
news:10*************@corp.supernews.com...
How to set the blank cell to 0 when a crosstab query is created?

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.