none
How to make 0 show up in access query when there is no value? RRS feed

  • Question

  • SELECT Employees.Analyst, Count([2019 Loan Log].Analyst) AS CountOfAnalyst
    FROM Divisions INNER JOIN (Employees INNER JOIN [2019 Loan Log] ON Employees.Analyst = [2019 Loan Log].Analyst) ON Divisions.Division = [2019 Loan Log].Division
    WHERE ((([2019 Loan Log].[Completion Date]) Between #1/1/2018# And #3/31/2018#))
    GROUP BY Employees.Analyst;

    Im having trouble to get my query to show zero when there is no value. Any help would greatly be appreciated. Thanks. 

    Monday, April 1, 2019 3:30 PM

Answers

  • That would be the Nz() function.

    peter n roth - http://PNR1.com, Maybe some useful stuff

    • Marked as answer by Skydawg19 Monday, April 1, 2019 4:22 PM
    Monday, April 1, 2019 3:37 PM
  • Hi Skydawg. I agree with Peter. You could try either:

    Nz(Count([2019 Loan Log].Analyst),0) AS CountOfAnalyst

    or

    Count(Nz([2019 Loan Log].Analyst,0)) AS CountOfAnalyst

    • Marked as answer by Skydawg19 Monday, April 1, 2019 4:22 PM
    Monday, April 1, 2019 3:39 PM

All replies

  • That would be the Nz() function.

    peter n roth - http://PNR1.com, Maybe some useful stuff

    • Marked as answer by Skydawg19 Monday, April 1, 2019 4:22 PM
    Monday, April 1, 2019 3:37 PM
  • Hi Skydawg. I agree with Peter. You could try either:

    Nz(Count([2019 Loan Log].Analyst),0) AS CountOfAnalyst

    or

    Count(Nz([2019 Loan Log].Analyst,0)) AS CountOfAnalyst

    • Marked as answer by Skydawg19 Monday, April 1, 2019 4:22 PM
    Monday, April 1, 2019 3:39 PM