Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record Display 1

Status
Not open for further replies.

Corneliu

Technical User
Sep 16, 2002
141
US
OK. I have a Marquee that I want to diplay news across the bottom of the page. What I want is 1 record at the time, depending on the date. If the date is past today, then display that record, if is in the past, forget about it. Now I got the records to show up, but they all show up at the same time. Is there a way to just show 1 record, than the next one behind it, etc etc. It will be like a sign between them like:
News1: This is your first record. News2: This is your second record. etc etc

Anyone can help me here PLEASE?
Here is the code.

<%
Set RS = Server.CreateObject(&quot;ADODB.Recordset&quot;)
SqlString = &quot;SELECT Entry_ID, Entry_Date, Title, Text&quot;
SqlString = SqlString & &quot; FROM News&quot;
SqlString = SqlString & &quot; WHERE [Entry_Date] > Date()&quot;
Set RS = objConn.Execute ( SqlString )

%>


<%
RS.movefirst
do while not RS.EOF
%>
<marquee bgcolor=&quot;#000000&quot; border=&quot;0&quot; align=&quot;middle&quot; scrollamount=&quot;2&quot; scrolldelay=&quot;90&quot; behavior=&quot;scroll&quot; width=&quot;100%&quot; height=&quot;16&quot; style=&quot;color: #FFFFFF; font-size: 14&quot;>
<a href=&quot; </marquee>
<%
RS.movenext
loop
%>

Thank You for your help.
 
Sorry if I accidentally post a blank message.

Try this:

<%If not Rs.EOF then%>
<marquee bgcolor=&quot;#000000&quot; border=&quot;0&quot; align=&quot;middle&quot; scrollamount=&quot;2&quot; scrolldelay=&quot;90&quot; behavior=&quot;scroll&quot; width=&quot;100%&quot; height=&quot;16&quot; style=&quot;color: #FFFFFF; font-size: 14&quot;>
<%Do until Rs.EOF%>
<a href=&quot; <%rs.MoveNext
Loop%>
</marquee>

<%End If%>


Let me know if it work or not. I have some other ways to approach this problem.

Have fun coding. tvuong5@cox.com
Sr. Software Developer.
 
THANK YOU VERY MUCH.

It works like a charm. Thankx again....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top