bueno en la 2da tabla le puse un link al numero de reporte pero cuando le doy click al link se queda en la misma tabla y el Request.querystring es el mismo que me trajo de la tabla anterior a esta.

Este es el codigo de la primera tabla:
Response.Write("<tr><td><font size='1'><a href=""consulta por pedimento2.asp?id=" & RS("numrep") &""">" & RS("numrep") & "</a></td><td><font size='1'> " & RS("cve_cte") & "</font></td><td><font size='1'> " & RS("fecha_t") & "</td><td><font size='3' color=crimson> " & RS("num_fac_t") & "</td><td><font size='1'> " & RS("tmov_t") & "</td><td><font size='1'> " & RS("rec_t") & "</td><td><font size='1'> " & RS("ela_t") & "</td><td><font size='1'> " & RS("ent_t") & "</td><td><font size='3' color=forestgreen><a href=""consulta por pedimento21.asp?id='" & RS("pedimento") &"'"">" & RS("pedimento") & "</a></td><td><font size='1'> " & RS("remesa") & "</td><td><font size='1'> " & RS("placas_t") & "</td><td><font size='1'> " & RS("cta_trans_t") & "</td><td><font size='1'> " & RS("nchofer_t") & "</td><td><font size='1'> " & RS("firma_t") & "</td><td><font size='1'> " & RS("horam_t") & "</td><td><font size='1'> " & RS("primera_t") & "</td><td><font size='1'> " & RS("aprimera_t") & "</td><td><font size='1'> " & RS("sprimera_t") & "</td><td><font size='1'> " & RS("segunda_t") & "</td><td><font size='1'> " & RS("asegunda_t") & "</td><td><font size='1'> " & RS("ssegunda_t") & "</td><td><font size='1'> " & RS("maniobras_t") & "</td><td><font size='1'> " & RS("incidencias_t") & "</td><td><font size='1'> " & RS("multas_t") & " </td></tr>")
RS.MoveNext
Y este el de la 2 tabla donde se queda
sSQL="SELECT * from TRAFICOS where pedimento= "& Request.QueryString("id")
<td><font size='1'><a href=""consulta por pedimento3.asp?id=" & RS("numrep") &"""><%=RS("numrep")%></a></font></td>