Solved

Help with if then statment

Posted on 2006-11-28
2
151 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
[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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

615 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