Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Displaying 0 in a crosstab query instead of a blan (access 97)

    I would like to display a 0 in a null field in a crosstab query instead of the field just being blank.. I was messing with the Nz function but had no luck.. Thanks..

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Displaying 0 in a crosstab query instead of a blan (access 97)

    I don't know of any practical way to make that work. The crosstab deals only with data, and it doesn't play nicely with the Nz function since there is no data there. I generally apply the Nz in the report the crosstab feeds into.
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Displaying 0 in a crosstab query instead of a blan (access 97)

    Charlotte can you give me an example of how I could use the Nz function in the report.. I think that would solve the problem.

  4. #4
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Indiana, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Displaying 0 in a crosstab query instead of a blan (access 97)

    Hi to you both. I had this "problem" yesterday in an unbound report field. I was calculating a percentage from two fields and when one of the fields was empty, I would get a blank value. What I did was add an IIf (immediate If) to the field in the report and it worked fine. For example, =IIf([field]=Null, "0",[field]).

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Displaying 0 in a crosstab query instead of a blan (access 97)

    The alternative syntax would be "=Nz([FieldName],0)".
    Charlotte

Posting Permissions

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