:: Forum >>

Empty Cell Bug

You showed how to fix this bug with an array, but how do you fix this with a recordset containing emty cells or fields?
John Souv
Wednesday, October 12, 2005
which version?
If it's version 1 and you are using the dynamic example, the code Alex used was:

function activewidgets_html(s)

s = Replace(s, "\", "\\")
s = Replace(s, """", "\""")
s = Replace(s, vbCr, "\r")
s = Replace(s, vbLf, "\n")

activewidgets_html = s
end function


I made a small change like so:

function activewidgets_html(s)
If Not isNull(s) Then
s = Replace(s, "\", "\\")
s = Replace(s, """", "\""")
s = Replace(s, vbCr, "\r")
s = Replace(s, vbLf, "\n")
End If
activewidgets_html = s
end function


We were getting an error on the replace function when it was applied against an null value.
Jim
Thursday, October 13, 2005
which version?
If it's version 1 and you are using the dynamic example, the code Alex used was:

function activewidgets_html(s)

s = Replace(s, "\", "\\")
s = Replace(s, """", "\""")
s = Replace(s, vbCr, "\r")
s = Replace(s, vbLf, "\n")

activewidgets_html = s
end function


I made a small change like so:

function activewidgets_html(s)
If Not isNull(s) Then
s = Replace(s, "\", "\\")
s = Replace(s, """", "\""")
s = Replace(s, vbCr, "\r")
s = Replace(s, vbLf, "\n")
End If
activewidgets_html = s
end function


We were getting an error on the replace function when it was applied against an null value.
Jim
Thursday, October 13, 2005
It works.

Thanks for your help Jim.
John Souv
Friday, October 14, 2005

This topic is archived.


Back to support forum

Forum search