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

LVL 1
AleksAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nitin SontakkeDeveloperCommented:
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?
0
AleksAuthor Commented:
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.
0
Nitin SontakkeDeveloperCommented:
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.
0
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

AleksAuthor Commented:
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.
0
Big MontyWeb Ninja at largeCommented:
to answer the original question, you can simply do

If  ( "" & rs_contactalert.Fields.Item("contact_alert_type").Value ) <> ""  Then

this will convert any NULL value into a string
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AleksAuthor Commented:
Thanks. This is what I needed.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.