Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count Is Null

Status
Not open for further replies.

matrixindicator

IS-IT--Management
Joined
Sep 6, 2007
Messages
418
Location
BE
I have a recordset counting the fields with a value "is not null". It works fine. I try to use the same sql to count the total of field with no value (is null). This is not working (also the query in design view is not working).

Code:
Set rst = dbs.OpenRecordset("SELECT Count(" & name & ") AS TotKolomNull " _
    & "FROM IMPORT " _
    & "HAVING (((Count(" & name & ")) Is Null))", dbOpenDynaset)
 
How about:

Code:
Set rst = dbs.OpenRecordset("SELECT Count(*) AS TotKolomNull " _
    & "FROM IMPORT " _
    & "WHERE " & name & " Is Null", dbOpenDynaset)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top