I am using the IsNull function to prevent passing Null values to another function, but the line with the IsNull check is itself throwing an Invalid Use of Null Error. I am a little confused and would appreciate any insight into what the problem may be. The Error is returning at line 20.
Code:
Private Sub txtReceivedFrom_BeforeUpdate(Cancel As Integer)
10 On Error GoTo err_txtReceivedFrom_BeforeUpdate
20 If Not IsNull(Me.txtReceivedFrom) Then
30 If Not LengthOK(Me.txtReceivedFrom, 20) Then
40 Cancel = True
50 Me.txtReceivedFrom.Undo
60 End If
70 End If
exit_txtReceivedFrom_BeforeUpdate:
80 Exit Sub
err_txtReceivedFrom_BeforeUpdate:
90 MsgBox "Error No: " & Err.Number & vbCrLf & "Description: " & Err.Description & vbCrLf & "Error Line: " & Erl
100 Call Logger("Error", "stores_v" & cstLatestVersion & ".Form_frmControlScreen.txtReceivedFrom_BeforeUpdate", Erl, Err.Number, Err.Description)
110 Resume exit_txtReceivedFrom_BeforeUpdate
End Sub