Click to See Complete Forum and Search --> : invalid use of null


January 30th, 2000, 04:09 PM
<vbcode>
If rstCurrent("City") = "" Then
txtCity = ""
Else
txtCity = rstCurrent("City")
End If
</vbcode>

rstCurrent is a recordset, txtCity is a textbox. The code above generates "Invalid use of null". How can I check if rstCurrent("City") is indeed Null?

thanks a lot

Crazy D
January 30th, 2000, 05:31 PM
Try this:

If IsNull(rstCurrent("City")) then
txtCity = "null"
ElseIf rstCurrent("City") = "" then
txtCity = ""
else
txtCity = rstCurrent("City")
End If




Crazy D :-)
"One ring rules them all"