Take a look at my code below and tell me why the value for isComment disappears and how to correct it. I haven't the foggiest idea what is going on here.
isComment is a memo field being pulled off an Access 2000 db. As soon as I check the value in the IF statement it immediately turns to NULL so the expression always evaluates to NULL whether there is a value initially or not. I can break execution on the line and have watched it change from a string to a NULL as I step through it.
Here is the code.
--------------------------------------------------------
--------------------------------------------------------
When I try the following code and pause execution on the first line it does the following:
1. Shows a value for !isComment and returns false and proceeds to the Else code.
2. When I check !isComment in the Else section it now shows Null and throws the dreaded 'Invalid Use of Null' error message at me.
----------------------------------------------------------
-----------------------------------------------------------
I have other fields that are working just fine. It is just this one field that is throwing an error at me. Any ideas or lessons on Nulls will be greatly appreciated.
Thanks
isComment is a memo field being pulled off an Access 2000 db. As soon as I check the value in the IF statement it immediately turns to NULL so the expression always evaluates to NULL whether there is a value initially or not. I can break execution on the line and have watched it change from a string to a NULL as I step through it.
Here is the code.
--------------------------------------------------------
Code:
If Not IsNull(adoRecordset!isComment) Then txtisComment.Text = adoRecordset!isComment
When I try the following code and pause execution on the first line it does the following:
1. Shows a value for !isComment and returns false and proceeds to the Else code.
2. When I check !isComment in the Else section it now shows Null and throws the dreaded 'Invalid Use of Null' error message at me.
----------------------------------------------------------
Code:
If IsNull(adoRecordset.Fields("isComment").Value) Then
txtisComment.Text = ""
Else
txtisComment.Text = adoRecordset!isComment
End If
I have other fields that are working just fine. It is just this one field that is throwing an error at me. Any ideas or lessons on Nulls will be greatly appreciated.
Thanks