Solved

Help with if then statment

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Dreamweaver CS6 FTP issues 12 1,291
Dreamweaver CS5.5 Error 5 531
What's Centering My Images ? 10 301
Dreamweaver rs SQL format question 4 100
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 …
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now