I'm not sure if you need to do one thing if it is null and another if it is not null, but using what user692942's method of instead of doing IsNull()
and just checking length to see if its greater than 0 is indeed the best way to do this, especially if you are only dealing with 'yes' as the only string. If you did have other options than just yes later, breaking it out into parts like I show below might be useful to you, but I based it off his example above so you would need to use the dims and same variable settings of course. You can even do nested IF/THEN's if you must, but it is more efficient to use CASE SELECT
if you have more elaborate combinations of outcomes. But on to the code:
IF Len(col1) > 0 Then
'col1 is NOT NULL
ELSE
'col1 is NULL
END IF
You could get one perfect with the code in place for each if it is null and it isn't null situation, then copy that and past it 3 more times, and just change the numbers on the other 3 to be col2 and col3 and so forth, but would be easy to get the whole thing in place fast if this is what you need instead.
Since someone saw this useful I thought I would cover a CASE SELECT too just in "CASE" there is need for more advanced logic, such as if it might matter if it was NULL versus '' empty or different string types, as well as a default everything else catcher, very handy stuff for this sort of thing.
Select Case col1
Case col1 = "" : 'code to do when its actually empty
Case col1 = Len(col1) > 0 AND col1 <> "" : 'code to do when its NULL
Case col1 = "yes" : 'code to do when its set to 'yes'
Case col1 = "no" : 'code to do when its set to 'no'
Case Else
'code to do when everything else not defined happens
End Select
The 'code to do parts are just comment lines that you would replace everything from the ' after it with the ASP code you want to happen what that case triggers.