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

Show zero in empty cells?

Status
Not open for further replies.

Bokazoit

Technical User
Sep 16, 2004
73
DK
Some of my the data in my report is 'empty' cells. How to change an empty cell with a 0 (Zero)?
 
This is an old argument!
If a cell is empty is could be that it is NULL meaning that nothing exists or that the calculation has not been done or did not yield a result or is a zero length string.
Anyway......
If the field is a NULL you can use the Nz() function that converts it to zero:
Me.ControlName = Nz(Me.ControlName, 0) or you can set the default property at the form or table level to zero:
Default = 0

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
You can simply use the Format property of the text box. There is an example in Help:
$#,##0.00[Green];($#,##0.00)[Red];"Zero";"Null"
In your case, replace at least "Null" with 0.

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top