Solved

if else including null and empty record

Posted on 2006-07-09
3
221 Views
Last Modified: 2010-04-06
Hello,

I have an if else statement which works if the record is empty but has a had a record in it before, how can I have this so it can also check for null, as in if spud = "" or null.

 <%
' Show IF Conditional region14
  If (Recmostofuser.Fields.Item("spud").Value) = "" Then
%>

grateful for any help

regards


Kenny
0
Comment
Question by:thatelvis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 17068901
Try:

    If IsNull(Recmostofuser.Fileds.Item("spud").Value) Or Recmostofuser.Fields.Item("spud").Value) = "" Then
0
 
LVL 26

Accepted Solution

by:
DireOrbAnt earned 125 total points
ID: 17069319
That might not work. If it doesn't try:
If IsDBNull(Recmostofuser.Fileds.Item("spud").Value) Or Recmostofuser.Fields.Item("spud").Value = "" Then
Or try:
If ("" & Recmostofuser.Fields.Item("spud").Value) = "" Then

0
 
LVL 1

Author Comment

by:thatelvis
ID: 17071473
this worked thanks all

If ("" & Recmostofuser.Fields.Item("spud").Value) = "" Then


kenny
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question