Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 10-12-2019, 12:05 AM   #1
wasim_sono
Newly Registered User
 
Join Date: May 2008
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
wasim_sono is on a distinguished road
Display 0 in blank or no data fields

I created a report with crosstab query. When I run the report it shows data and some fields which have no data display as blank. I want to replace 0 rather than blank or spaces.

I used
Code:
 NZ([SumOfAmount],0)
and
Code:
IIF([SumOfAmount]="",0,[SumOfAmount])
but doesn't work and give space error.

I really grateful for ur replies.

wasim_sono is offline   Reply With Quote
Old 10-12-2019, 12:57 AM   #2
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,568
Thanks: 68
Thanked 2,744 Times in 2,629 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Display 0 in blank or no data fields

on the crosstab query, edit in SQL view:

Transform Sum(Nz(Amount, 0))
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
Old 10-12-2019, 01:35 AM   #3
wasim_sono
Newly Registered User
 
Join Date: May 2008
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
wasim_sono is on a distinguished road
Re: Display 0 in blank or no data fields

I tried but not working.

wasim_sono is offline   Reply With Quote
Old 10-12-2019, 02:13 AM   #4
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 10,901
Thanks: 114
Thanked 2,981 Times in 2,712 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Display 0 in blank or no data fields

Really? Saying its not working isn't helpful for us to help you.
What exactly happened when you tried arnel's suggestion?
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin (Mendip Data Systems)
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
Old 10-12-2019, 11:55 AM   #5
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,327
Thanks: 40
Thanked 3,667 Times in 3,536 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: Display 0 in blank or no data fields

why not use the format property?

0.00;-0.00;0.00;0.00
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is online now   Reply With Quote
Old 10-14-2019, 04:10 AM   #6
wasim_sono
Newly Registered User
 
Join Date: May 2008
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
wasim_sono is on a distinguished road
Thumbs up Re: Display 0 in blank or no data fields

Thanks to all who give their precious time. Actually I'm using nz function wrongly. but thanks God as well as all of you that I identify the problem and resolve the matter.

wasim_sono is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fields containing data initially appear blank aesantiago51 Forms 0 06-20-2013 08:28 AM
How To Have Blank Data Fields When Entering A Form DAPOOLE Queries 1 01-25-2010 06:04 AM
Blank spaces in data fields after copying data with SQL CrArC Queries 12 04-16-2007 03:45 AM
[SOLVED] leaving fields blank with no data (in a report) keithwhoriskey Reports 2 08-20-2004 04:05 AM
Display Blank Fields Xenix Queries 4 02-06-2002 06:26 AM




All times are GMT -8. The time now is 03:12 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World