Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004

    Unanswered: Report will NULL values, "0"...


    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])

    These both display a #Error on the report.

    Any help would be great...

  2. #2
    Join Date
    Feb 2004
    Chicago, IL
    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.

  3. #3
    Join Date
    Jun 2003
    And from the way things are used I believe this:
    [male_count_16_20] Is Null

    Should be changed to this:
    J. Paul Schmidt, Freelance Web and Database Developer
    Access Database Sample, Web Database Sample, ASP Design Tips

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts