Hey you ASP masters out there. I need an expert!!!

I use a form to derive the WHERE clause of a SQL statement. From the recordset that's generated, I use ths page breakdown thing that I found on ASP Watch. It works great on the first page (or on pages where the SQL statement is Hardcoded) but where the SQL statement is dynamic (from the form), it divides up the pages, and links them properly, but when I try to move to the 2nd or latter pages, I get an error stating a problem with the "WHERE" clause.

My guess is that I have to somehow pass the user input to each page... But that doesn't make sense since the recordset is already generated!!!! I don't know. Any suggestions??

[code]
strSQL = strSQL & " WHERE " & varSQL
oRS.Open strSQL, oConn, adOpenStatic, , adCmdText

If oRs.RecordCount > 0 then
oRs.movefirst
response.write "<p>Your searched yielded " & oRS.Recordcount & " results. Here they are: </p>"

oRS.PageSize=10

If not isEmpty(Request.QueryString("pageno")) then pageno=Request.QueryString("pageno") else pageno=1
oRS.AbsolutePage=pageno

links="<p>"
for page=1 to oRS.PageCount
links=links & "<a href='test-resp.asp?pageno=" & page & "'>Page "&page&"</a>"
if page < oRS.PageCount then
links=links & " | "
end if
next
links=links & "</p>"
response.write links

for intRecord =1 to oRS.PageSize

'OuTput HeRe

oRS.movenext
if oRS.EOF then
exit for
end if
next
[/code}

I'll give you much internet props if you can help!!!!