Null Variable Assistance

jstevens
GoldLounger
Posts: 2629
Joined: 26 Jan 2010, 16:31
Location: Southern California

Null Variable Assistance

Post by jstevens »

I'm having a challenge with an If/Then statement relative to a "NULL".

I can't get the code to identify the "NULL" and process the "IF". I have tried = "", = "NULL" and = NULL.
untitled.png
Regards,
John
You do not have the required permissions to view the files attached to this post.
Regards,
John

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Null Variable Assistance

Post by HansV »

Use the IsNull function:

If IsNull(objRecordset.Fields(ReturnField)) Then
Best wishes,
Hans

jstevens
GoldLounger
Posts: 2629
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Null Variable Assistance

Post by jstevens »

Thank you Hans,
John
Regards,
John