if rather than deleting the full record, the end user merely wipes out the entry, I'd like to delete the record with code (if that's what they really wanted to do)
as an example, the table has (4) records and the user clears one;
i then run the following code in the AfterUpdate() event
however, the results are:
tl count 4
isNull 0
not isNull 4
after deletion, tl count 4
effectively: nothing happens: it does not see any null records, none are deleted
I'm stuck and any suggestions/directions will be greatly appreciated in advance,
m.
Code:
If gsMsgResponse = vbYes Then
DoCmd.SetWarnings False
Debug.Print "tl count: " & DCount("[Prgrm_ID]", "tbeIncentive_Prgrms")
Debug.Print "isnull: " & DCount("[Prgrm_ID]", "tbeIncentive_Prgrms", "IsNull([Prgrm_Descript])")
Debug.Print "not isnull: " & DCount("[Prgrm_ID]", "tbeIncentive_Prgrms", "Not IsNull([Prgrm_Descript])")
gsSQL = "Delete * from tbeIncentive_Prgrms" & _
" WHERE isnull([Prgrm_Descript]);"
CurrentDb.Execute gsSQL, dbFailOnError
Debug.Print "after deletion, tl count: " & DCount("[Prgrm_ID]", "tbeIncentive_Prgrms", IsNull([Prgrm_Descript]))
Else
Me.cboPrg.Undo
End If
'....