>>Here's my take on it
>>
>>lnFirst = 32000
>>lnPageSize = 25
>>lnStart = thisform.txtStart.Value
>>
>>thisform.txtPageno.Value = CEILING((lnStart - lnFirst + 1) / lnPageSize )
>>
>
>You were close:) I like Ceiling() and use it more in fact too:
>
>
thisform.txtPageno.Value = CEILING((m.lnStart - m.lnFirst) / m.lnPageSize )
>
There's discrepancy in the original data. On one hand record numbers start from 32000. On other hand the first page starts with record # 32001. There's no need to change the formula, only lnFirst has to be adjusted.
--sb--