I'm pulling data from a field on a form, evaluating whether or not it's null, then calculating based on the data in the field. Here's my code for evaluating the field:
intAdvanced = IIf(Not IsNull(Me.txtAd vanced), CLng(Me.txtAdva nced), 0)
So if the field's not null, it Converts it to a Long and sets the variable to that, otherwise, the variable is 0.
However, the program's erroring on this line, Run-Time 94, invalid use of Null! How can I be using null invalid, when, in fact, I'm specifically changing the value to 0 if it's null?
intAdvanced = IIf(Not IsNull(Me.txtAd vanced), CLng(Me.txtAdva nced), 0)
So if the field's not null, it Converts it to a Long and sets the variable to that, otherwise, the variable is 0.
However, the program's erroring on this line, Run-Time 94, invalid use of Null! How can I be using null invalid, when, in fact, I'm specifically changing the value to 0 if it's null?
Comment