473,395 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

If = empty field

229 100+
Hi, Could anyone tell me how I can change this if statement to say...If the field "defaultmessage" is empty do xxxxxx (ie. nothing) and if it has some content do xxxxxxxxx


Expand|Select|Wrap|Line Numbers
  1.                            <%
  2. If InStr(rsCard("DefaultMessage"),"eempty") > 0 Then
  3. %>
  4. <a href="cards.asp?PostCardID=<%=rsCard("PostCardID")%>"><%=rsCard("DefaultMessage")%></a><br>
  5. <%
  6. Else
  7. %>
  8. <a href="artgallery.asp?author=<%=rsCard("author")%>">
  9. <%
  10. End If
  11. %>
Thanks for any help
Richard
Nov 11 '07 #1
3 1534
fran7
229 100+
Thanks, I have found this does the trick

Expand|Select|Wrap|Line Numbers
  1. <%
  2. If IsBlank(rsCard("imageone")) Then
  3. %>
  4.  
  5. <%
  6. Else
  7. %>
  8. <%
  9. End If
  10. %>
Nov 12 '07 #2
jhardman
3,406 Expert 2GB
I would have said:
Expand|Select|Wrap|Line Numbers
  1. if x <> "" then
  2.    'do something
  3. end if
Glad you got it to work.

Jared
Nov 13 '07 #3
fran7
229 100+
Thanks, thats looks good
Richard
Nov 13 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Adrian Parker | last post by:
Hi. I have a date time picker in my program which uses ADO to read from an Access database. It works perfectly, unless the database is empty (no records) when opened. When you try to open an...
8
by: Lyn | last post by:
I am trying to get my head around the concept of default, special or empty values that appear in Access VBA, depending on data type. The Access Help is not much (help), and the manual that I have...
1
by: Thierry | last post by:
Hi, I've got the next problem: I have a datetime field in my database (sql-server) and I want the option in it that this field can be empty. But if I leave that datetime field empty I get...
3
by: Joachim | last post by:
Hi I am a beginner in VB.NET, and have a problem with empty field in Access I have transfered a worksheet in Excel to Access table. Some of the cels are empty I use VB.NET program to acces...
3
by: jmarr02s | last post by:
Hi, How do I replace with when the field is empty? Thanks! jmarr02s
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.