In reading a record set (from Access 2000, if it matters) I find that I have to call IsNull twice. In the following fragment you owuld think that "NULL2" is never displayed, yet I find that it is.
Any ideas?
Thanks in advance,
JonathanC
While rs.EOF = False
str = ""
For i = 0 To rs.Fields.Count - 1
If i > 0 Then str = str & ","
If IsNull(rs.Fields(i).Value) Then
str = str & "NULL1"
ElseIf IsNull(rs.Fields(i).Value) Then
str = str & "NULL2"
Else
str = str & Trim(rs.Fields(i).Value)
End If
Next
List1.AddItem str
rs.MoveNext
Wend
Any ideas?
Thanks in advance,
JonathanC
While rs.EOF = False
str = ""
For i = 0 To rs.Fields.Count - 1
If i > 0 Then str = str & ","
If IsNull(rs.Fields(i).Value) Then
str = str & "NULL1"
ElseIf IsNull(rs.Fields(i).Value) Then
str = str & "NULL2"
Else
str = str & Trim(rs.Fields(i).Value)
End If
Next
List1.AddItem str
rs.MoveNext
Wend