Testing for a null field in a recordset in vba

  • Thread starter Thread starter Simon Guertin
  • Start date Start date
S

Simon Guertin

Hi, I am having a hard time to test if my field that could
contain a date is null or not.
IsNull does not seems to work
is not null.. I don't know what to do.

here is some of my code:

IIf(Not IsNull(destination.Fields(1).value).....


is this the proper way to test a field to know if it is
null?

thanks

Simon
 
That won't work when the field is Null. Null is not equal to "".

Simon: What you've got is fine, or you can use

IIf(Len(destination.Fields(1).value & vbNullString) > 0,....
 
Back
Top