Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2003
    Posts
    35

    Unanswered: Re-labelling Null groupings in Queries/Reports

    I'm designing a query to list Categories (column A) and counts by category (column B). If the category is null, the query actually shows the combo box used to select a Category in the table! I was wondering if you could relabel this query output so that it lists as "(Null)" or something to that effect.

    Example output:

    Category --- Count
    First --- 7
    Second --- 2
    Third --- 12
    --- 5

    The fourth row is all the instances where the category is not yet entered, but the location where I'd like to put in "(Null)"

    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi

    Something Like:

    Code:
      
    SELECT NZ([MyGrouping, "(NULL)"), Count(*)
    FROM MyTable
    GROUP BY NZ([MyGrouping, "(NULL)")
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Sep 2003
    Posts
    35
    This works. However, I am using a combo box lookup to show words rather than codes. When I add this NZ() code, "(Null)" appears appropriately but the other categories turn into codes, rather than words. Any way to modify this?

  4. #4
    Join Date
    Sep 2003
    Posts
    35
    Can anyone help me with this?

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Use the field with words rather than the codes in the select statement.
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

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