Results 1 to 6 of 6

Thread: Help with Query

  1. #1
    Join Date
    Mar 2004
    Posts
    77

    Unanswered: Help with Query

    this problem may have been answered in the past, but i cannot find the thread. the problem i'm facing is that i need to count the number of closed status, using name as a criteria(i.e. how many closed status for this name). but if i typed in a name which have no closed status, the query returns me nothing. how do i make the query to at least show a zero in this case? thx.

  2. #2
    Join Date
    Sep 2004
    Location
    Tampa, FL
    Posts
    520
    I take a bite ot answering the question. From the sound of your description you have the count working OK but would like to see a Zero instead of nothing when the result is blank.
    I would try using an IIF statement. For example if the filed you have that counts the total is called "ED" the use
    Code:
    IIF([ED] IS NULL,0,[ED])
    This looks at Field ED if it is null it sets Ed to a "0" if not it uses the value already existing for ED.
    Darasen

  3. #3
    Join Date
    Sep 2004
    Location
    Charlotte, NC
    Posts
    164
    I can help you with this, but can you tell me how you determine closed status. Is it a value in some field in the same table that has the name in it?

    TD

  4. #4
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    For all my databases that I had I used a CheckBox to denote it as Closed, then worked it from there.

    BUD

  5. #5
    Join Date
    Mar 2004
    Posts
    77
    thx ppl. but i solved it already.

  6. #6
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Quote Originally Posted by chanjw
    thx ppl. but i solved it already.
    Hi chanjw,

    It's great you solved your problem, however it is a courtesy of this forum that when you get a solution that you kindly post it or describe it in the forum, that way others who may come upon the same problem as you may be able to see the answer. Not a requirement, but just a common courtesy.

    have a nice one,
    BUD

Posting Permissions

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