Link to home
Start Free TrialLog in
Avatar of Aleks
AleksFlag for United States of America

asked on

Display if field is NOT "" or NOT null

I have the following code which will display a region if a recordset field is not = ""  (blank)
I need to add to it that is also NOT null.

<% If rs_contactalert.Fields.Item("contact_alert_type").Value <> ""  Then 'script %>

REGION

 <% End If %>   

Open in new window

Avatar of Nitin Sontakke
Nitin Sontakke
Flag of India image

What is the database system? Why not solve it at the root itself? Add isnull(contact_alert_type, '') contact_alert_type in the select statement itself.

What do you think?
Avatar of Aleks

ASKER

contact_alert_type  is the field of the recorset. if the field value is either NULL or ""  then the region won't be displayed. I am not clear what you are asking.
Okay...how is the recordset created? There must be a select statement somewhere if it is the kind of web applications I have been developing.
Avatar of Aleks

ASKER

its a simple select. I will change it so that if its NULL then it will make it ""  I can do that, but that was not the initial question for the IF statement.
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Aleks

ASKER

Thanks. This is what I needed.