Can't count by SQL when items manually deleted in Access

E

evinika

I am using a SQL count(*) to count blank items under certain conditions.
When I clear a field manually in Access the newly blank fields are not
counted. The SQL statement looks like:
SELECT count(*) as rec_count FROM January where Problem_Owner = 'andmart'
AND Review_Completed<>'Yes' AND Review_Completed<>'Skipped' AND
Review_Completed<>'Selected'
This error ONLY occurs after an item is cleared manually. If there are ten
full items and no blank ones and I delete one of them, i can count nine full
fields and no blank ones.
What exactly is the problem?
 
C

Chaim

Rather than use this to test for 'blank' records:
Review_Completed<>'Yes' AND Review_Completed<>'Skipped' AND
Review_Completed<>'Selected'

Try this:
where Nz(Review_Completed, "") = ""

I'm not certain (I intend to find out though), that what appear to be blank
records are actually NULLs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top