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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Showing Zero's on a report



 
 
Thread Tools Display Modes
  #1  
Old March 4th, 2009, 05:17 PM posted to microsoft.public.access.tablesdbdesign
Kay Starnes
external usenet poster
 
Posts: 27
Default Showing Zero's on a report

Can anyone help me make my report show zero's in a number field on my report?
The table's field is blank therefore the Q returns a blank field.
  #2  
Old March 4th, 2009, 06:24 PM posted to microsoft.public.access.tablesdbdesign
Fred
external usenet poster
 
Posts: 1,451
Default Showing Zero's on a report

"Blank" = null which means no number has been entered.
Zero = the field has a specific value.

So printing a zero for a field which is null is technically wrong. But.....

If you are considering an untouched field to be a "0" set 0 as the default
value for that field.
  #3  
Old March 4th, 2009, 06:46 PM posted to microsoft.public.access.tablesdbdesign
Clifford Bass[_2_]
external usenet poster
 
Posts: 1,295
Default Showing Zero's on a report

Hi Kay,

You could set the control's format to something like:

#,##0;-#,##0;;0

Clifford Bass

"Kay Starnes" wrote:

Can anyone help me make my report show zero's in a number field on my report?
The table's field is blank therefore the Q returns a blank field.

  #4  
Old March 4th, 2009, 08:58 PM posted to microsoft.public.access.tablesdbdesign
Barry A&P[_2_]
external usenet poster
 
Posts: 119
Default Showing Zero's on a report

Kay

Use
=IIf(IsNull([YourField]),"0",[YourField])
as the controls "control source"

use "0" if you want 0 returned or you can put words too like "No Data Entered"

Good luck
Barry

"Clifford Bass" wrote:

Hi Kay,

You could set the control's format to something like:

#,##0;-#,##0;;0

Clifford Bass

"Kay Starnes" wrote:

Can anyone help me make my report show zero's in a number field on my report?
The table's field is blank therefore the Q returns a blank field.

  #5  
Old March 4th, 2009, 10:09 PM posted to microsoft.public.access.tablesdbdesign
Fred
external usenet poster
 
Posts: 1,451
Default Showing Zero's on a report

Might need saying, if using Barry's method to change the control name if it's
the same as the field name.
  #6  
Old March 5th, 2009, 06:06 PM posted to microsoft.public.access.tablesdbdesign
Barry A&P[_2_]
external usenet poster
 
Posts: 119
Default Showing Zero's on a report

Good call fred, Forgot about that cyclic redundancy thing, Thanks

"Fred" wrote:

Might need saying, if using Barry's method to change the control name if it's
the same as the field name.

  #7  
Old March 6th, 2009, 03:40 PM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Showing Zero's on a report

I would actually use Clifford's suggestion since it doesn't involve changing
the Control Source.

However, I would change:
=IIf(IsNull([YourField]),"0",[YourField])
to
=IIf(IsNull([YourField]),0,[YourField])
I try to keep the proper data type and "0" is a string which doesn't make
sense.

You could also use the simpler:
=Nz([YourField],0)
or
=Val(Nz([YourField],0))



--
Duane Hookom
Microsoft Access MVP


"Barry A&P" wrote:

Good call fred, Forgot about that cyclic redundancy thing, Thanks

"Fred" wrote:

Might need saying, if using Barry's method to change the control name if it's
the same as the field name.

 




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:29 AM.


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