Search code examples
ms-accessms-access-2003

Check null value in MS Access Query


In SQL Server we can use IsNull() function to check whether expression value is null or not. For ex.

Select IsNull(sum(amount),0) as TotalAmount
  From Payments 

Likewise is there any function in MS Access Query to check the null? I need the same statement to be executed in MS Access Query.

Can anybody tell me the replacement for IsNull() in MS Access?


Solution

  • Pretty much the equivalent in Access is the nz function.

    There's a good page on how to use it here.

    However, if you're using Access just as a database backend and using Jet in your connectionstring then nz won't be available to you.