Heres my code now:
<% ' Last Edit: CRM_04mar05 %>
<%
'userid=trim(request.cookies("userid"))
'agencyid=trim(request.cookies("agencyid"))
'agentid=trim(request.cookies("agentid"))
userid=Session("userid")
agencyid=Session("agencyid")
agentid=Session("agentid")
'response.write "User ID " & userid & "<br>"
'response.write "Agency ID " & agencyid & "<br>"
'response.write "Agent ID " & agentid & "<br>"
'ordby=trim(Request.QueryString("ordby"))
'searchname=trim(Request.QueryString("searchname") )
'searchagent=trim(Request.QueryString("searchagent "))
'timeoption =request.querystring("timeoption")
'response.write timeoption & "<br>"
'user=trim(request.querystring("searchby"))
'agencyid=trim(request.querystring("agencyid"))
'Response.Write userid
'Response.Write searchagent
function setdate(Fdate)
Select Case Fdate
Case "JAN"
validdate = "01"
Case "FEB"
validdate = "02"
Case "MAR"
validdate = "03"
Case "APR"
validdate = "04"
Case "MAY"
validdate = "05"
Case "JUN"
validdate = "06"
Case "JUL"
validdate = "07"
Case "AUG"
validdate = "08"
Case "SEP"
validdate = "09"
Case "OCT"
validdate = "10"
Case "NOV"
validdate = "11"
Case "DEC"
validdate = "12"
end select
setdate = validdate
end function
%>
<style>
a.{text-decoration:none}
</style>
<body bgcolor="#f5f5f5" alink="blue" link="blue" vlink="blue">
<form name="form">
<%
Set rs=con.execute("select * from trip_master where agencyid = '"&agencyid&"' and regular_trip <> 'Cancelled' limit 50,50")
%>
<table width=700 cellspacing=1 cellpadding=2 border=1 align=center>
<tr bgcolor='#ececec'bordercolor='#cccccc'>
<td align='left'>
Name
</td>
<td width='10%' align=center>
Status
</td>
<td align='center'>
Booking No.
</td>
<td align='center'>
Departure Date
</td>
<td align='center'>
Itinerary
</td>
<td align='center'>
Booking Date
</td></tr>
<%
'response.write ("select * from trip_details where trip_id = 'MK/"&rs("A1_pnr")&"'")
set rscrm2 = con.execute("select dep_airport from trip_details where trip_id = 'MK/"&rs("A1_pnr")&"' order by tatoo asc")
'response.Write ("select dep_airport from trip_details where trip_id = 'MK/"&rs("A1_pnr")&"' order by tatoo asc")
departing_air = rscrm2("dep_airport")
%>
<% while not rs.eof %>
<% set rscrm = con.execute("select * from trip_details where trip_id = 'MK/"&rs("A1_pnr")&"' order by tatoo asc")%>
<tr bgcolor='#ececec'bordercolor='#cccccc'>
<td align='left'>
<%=rs("leadname")%>
</td>
<td width='10%' align=center>
<%=rs("regular_trip")%>
</td>
<td align='center'>
<a href="mytrip_new.asp?pnrno=<%=rs("A1_pnr")%>"><%=r s("A1_pnr")%></a>
</td>
<td align='center'>
<%=rs("Destination_Arrival_Date")%>
</td>
<%
counter = 0
while not rscrm.eof
counter = counter+1
var_arr = rscrm("arr_airport")&"-"
arriving_air = arriving_air & var_arr
'abcd = var_arr+var_arr
'response.write "abcd = " & abcd & "<br>"
'response.write "departure airport = " & var & "<br>"
'response.write "arrival airport = " & var_arr & "<br>"
rscrm.movenext
wend
crm_iti = departing_air&"-"&arriving_air
%>
<td align="center">
<%=left(crm_iti,len(crm_iti)-1)%>
</td>
<td align="center">
<%=rs("date_of_booking")%>
</td>
</tr>
<%
rs.movenext
wend
%>
</table>
</form>
</body>
<%
set rscount=con.execute("select count(*) from trip_master where agencyid = '"&agencyid&"' and regular_trip <> 'Cancelled'")
count_rows = rscount("count(*)")
'response.write "Count Rows = " & count_rows & "<br>"
if count_rows > 100 then
%>
<div align="center">
<a href="javascript
: history.back();">
<< Previous 50 </a>
<a href="bookdates_101.asp">
Next 50 >></a>
</div>
<% else %>
<br>
<div align="center">
<a href="bookings.asp">
Back to Bookings
</a>
</div>
<% end if %>
</html>
what is happeneing now is the same itinerary keeps incrmenting itself, no joy as yet
www.crmpicco.co.uk