If C.SentOn is null, then you will get an error because you can't compare null to anything. If this is the problem, then the fix would be
- If C.SentOn & "" <> "" Then
By concatenating a zero-length string to C.SentOn, you make it not null without changing the value that you are comparing.