I've added some, what I believed to be simple, code to an existing Sub that is looping through a RecordsetClone. I've commented out statements that I don't want to execute while I test the few added statements you see following the Debug.Print.
The Debug.Print confirmed that the field ".CYP" is in fact Null where it is Null, but the "If .CYP = Null Then" statement resulted in "False" every time the statement was encountered and the desired statements that follow a "True" condition did not run. I put a Breakpoint on the statement "If .PCCode <> "C" Then" but it never fired.
Any ideas?
Code:
With Me.RecordsetClone
.MoveFirst
Do While .EOF = False
'.Edit
'.LYP = .CYP
'.Update
'
' .Edit
' .CYP = .NYP
' .Update
'
' .Edit
' .NYP = Empty
' .Update
'See if individual has already paid for the new year.
'Debug.Print .CYP
If .CYP = Null Then
If .PCCode <> "C" Then "Don't negate any notification of pending data changes.
.Edit
.PCCode = Empty
.Update
End If
End If
.MoveNext
Loop
End With