Pdeters
asked on
Access 2033 counting number of records in a form that the field is not null
I have an Access form that I am counting the number of records in a form. If the field is null I do not want to count it but still show the record for all the other fields.
This is what I am useing
Count([task1])
This field could be null but the other fields need to be showing. How do I count haev it count jsut the records where this field is not null
This is what I am useing
Count([task1])
This field could be null but the other fields need to be showing. How do I count haev it count jsut the records where this field is not null
Also try ....
DCount("[task1]", "YourTable/Query", "Nz([task1], '')<>''")
ET
DCount("[task1]", "YourTable/Query", "Nz([task1], '')<>''")
ET
This will give you all the fields plus the count of all non-null values of fld3:
SELECT a.fld1, a.fld3, a.fld3, (SELECT Count(b.fld3) FROM myTable b) AS CountFld3 FROM myTable a
SELECT a.fld1, a.fld3, a.fld3, (SELECT Count(b.fld3) FROM myTable b) AS CountFld3 FROM myTable a
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks, glad to help.
=Count(*) should give a count of all records
=Count([task1]) should give a count of records where [task1] is not null
Are you sure that you don't have records where [task1] is a zero-length string which looks like Null but is not?
Best regards,
Graham