Hello Excel Forum,
I'm running a macro that retrieves data from database and sorts it based on a field, which contains a date value. If the value of the field is less than the current date or doesn't contain anything (i.e. is null), I want to do something with it. The code is as follows:
However, when the code reaches this line I get 'invalid use of null'. I've tested the value of the field in the Immediate window and the field value on the very first data line is Null. How can I achieve what I'm trying to do?![]()
If IsNull(RCD.fields(6).Value) Or DateValue(RCD.fields(6).Value) <= Date Then RCD.movenext End If
Thanks
Bookmarks