Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2007

    Unanswered: Problem displaying query results

    How can I add the results of 4 queries and display them in a text box if one or more of the queries does not return any results? I am currently using the following code which works as long as all 4 queries return results:

    =DLookUp("SumOfMemo","qry 0-30 Days GDS") + DLookUp("SumOfMemo","qry 0-30 Days Incentified") + DLookUp("SumOfMemo","[qry 0-30 Days Lvl 1 & 2]") + DLookUp("SumOfMemo","[qry 0-30 Days Lvl 3 & 4]")

    So this code works as long as all the queries find results but if even one of them does not find a result then the text box is left blank.

    Bryan Huelsbeck

  2. #2
    Join Date
    May 2006

    Isn't it about using IIF(..) catching NULL values and substituting them by 0?


  3. #3
    Join Date
    May 2006
    why you dont use NZ()function
    it will return zero if the value was null
    textbox.text = nz(query1,0)

Posting Permissions

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