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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|