Hi, all!
I'm fighting with SQL statements again...and they're winning.
My boss wanted some different data displayed, and now I need to be able to find records where a certain date field is null, meaning that a claim is still open. I've searched online, and seen all kinds of different ways people are saying to do it. The bulk of the SQL statement that I had before, that searches for dates within a range, will work for this, it's just finding those without dates that's tricky. Per the things I've read online, I've tried NULL, IS NULL, and Nz, and on both sides of the date field, but nothing works; when I run it, the debug.print looks right, but the text box gets a "0", every time, even though I've got test data that SHOULD be putting 2,000 in it.
Can anyone tell where the NULL line is going wrong?
Code:
"SELECT Sum(tblMnlClaim.MClmRes) AS SumOfMClmRes " _
& " FROM tblMnlClaim WHERE tblMnlClaim.EntID = '" & Me.ctlActEntID & "' " _
& " AND tblMnlClaim.PolNum = '" & Me.ctltblRnwlTrack_PolNum & "'" _
& " AND tblMnlClaim.MClmCxDt IS NULL;"