Solved

Help with if then statment

Posted on 2006-11-28
2
147 Views
Last Modified: 2010-04-25
I want to write an if then statement so that a record only displays if there is something in the entry other than "Select Month" and "Select Day" (the first selection in two drop down menus). I don't know the proper way to write this in code. Can someone take a look at what I've got and help me out? I'm using ASP VBScript. Thanks.

 <% If rsevents.monthto <> "Select Month" And rsevents.dayto <> "Select Day" Then %>
                    to <%=(rsevents.Fields.Item("monthto").Value)%>&nbsp;<%=(rsevents.Fields.Item("dayto").Value)%>
  <% End If ' end rsevents.EOF And rsevents.BOF %>

recordset = rsevents
column names = monthto and dayto
0
Comment
Question by:elliottbenzle
2 Comments
 
LVL 25

Accepted Solution

by:
Rouchie earned 500 total points
ID: 18034698
Try this as an alternative to your first line:

<%
If rsevents.Fields.Item("monthto").Value<> "Select Month" AND rsevents.Fields.Item("monthto").Value <> "Select Day" THEN
%>

Let me know the outcome...
0
 
LVL 4

Author Comment

by:elliottbenzle
ID: 18036009
wroks great. thanks
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
COLDFUSION 9 DEVELOPMENT SERVER STOPPED WORKING 9 451
drop down button disappears 12 102
I'm running a risk by using Adobe Flash in my site ? 9 119
Adobe Products Forum? 3 155
For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

825 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