I have the below code on a coldfusion page. This page displays the data from the query below having 25 records per page with pagination. Now i need to provide a textbox and search button so that the user can enter the positionid and hit search....the problem im havign here is how can the nth page be displayed if the positionid is in for example 7th page out of 200 pages. please advice. thanks

<cfquery name="qry_postn_detail" datasource="mbtran">
select distinct position_id,schedule_group,accrual_profile,pay_rule_name,rest_days
from kronos_if.position_detail
order by position_id
</cfquery>

<cfset perpage = 25>

<cfparam name="url.start" default="1">
<cfif not isNumeric(url.start) or url.start lt 1 or url.start gt qry_postn_detail.recordCount or round(url.start) neq url.start>
<cfset url.start = 1>
</cfif>

<cfset totalPages = ceiling(qry_postn_detail.recordCount / perpage)>
<cfset thisPage = ceiling(url.start / perpage)>

<cfset thisPage = Int(start / 25) + 1>

Page<cfoutput>
<cfloop from="1" to="#totalPages#" index="i">
<cfif i is thisPage>
#i#


<cfoutput query="qry_postn_detail" startrow="#url.start#" maxrows="#perpage#">
<tr>
<td align="center">
<input type="checkbox" name="vSelection" value="#currentrow#"></td>
<td align="CENTER">#position_id#
<input type="hidden" name="vpostn" value="#position_id#">
</td>
<td align="CENTER">
<cfset vsch_grp = schedule_group>
<select name="vschgrp">
<cfloop query="allschedgrp">
<option value="#schedule_group#" <cfif vsch_grp eq schedule_group>Selected</cfif> >#schedule_group#</option>
</cfloop>
</select>
</td>
<td align="CENTER">
<cfset vacrr_prof = accrual_profile>
<select name="vaccprof">
<cfloop query="allaccrprof">
<option value="#accrual_profile#" <cfif vacrr_prof eq accrual_profile>Selected</cfif> >#accrual_profile#</option>
</cfloop>
</select>
</td>
<td align="CENTER">
<cfset vpay_rule = pay_rule_name>
<select name="vpayrul">
<cfloop query="allpayrulename">
<option value="#pay_rule_name#" <cfif vpay_rule eq pay_rule_name>Selected</cfif> >#pay_rule_name#</option>
</cfloop>
</select>
</td>
<td align="CENTER">
<cfset vrest_days = rest_days>
<select name="vrestdays">
<cfloop query="allrestdays">
<option value="#rest_days#" <cfif vrest_days eq rest_days>Selected</cfif> >#rest_days#</option>
</cfloop>
</select>
</td>
</tr>
</cfoutput>