I have a report which is displaying the value from a query. The problem now is when there is a value it reports the number which is good. When there is nothing to pull it puts nothing and I at least want to see a "0" in that field and I cannot accomplish this.
I have tried the following:
=IIf([male_count_16_20] Is Null Or [male_count_16_20]="","0",[male_count_16_20])
The Nz function (first option) looks like it should work. The second option needs a change.
What is the name of the textbox? Is it male_count_16_20? That is the default name that Access gives it when you drop a field onto a report. The problem comes in when you add the = in the ControlSource. The the field name and the text box name are the same then Access gets confused.
What's even more frustrating, in later versions of Access (2002 and higher) when you change the name of the text box, the Control Source changes as well to help you out. Which effectively gives you the same problem.
So change the name of the textbox (I use a naming convention, textboxes are preceded by txt, ex. txtOrderTotal). Then make sure the Control Source was not automatically changed.