>Helo, Ian.
>
>Well, sort of. The whole BOF() thing annoys me as well. A trick I like to use is to have a Form property called FirstRecord. This property stores the first record number for the main alias in the Form. Whenever I requery the main alias if a view or set a filter (I don't do much with filters) and in Form.Init, I do a LOCATE (same as GO TOP only reputably faster) and store the first record number (or 0 if no records) to Form.FirstRecord.
>
>On Refresh, then, or where appropriate, if the RECNO('mainalias') = Form.FirstRecord I know I'm at the logical beginning of the file ... regardless of the setting of the BOF() ( which is only true when you try to move ahead of the first record).
This assumes, that you never change natural table order in your form.
>>I am applying a filter to a table with just over 110,000 records and it is taking ages to return the data. After using the coverage profiler I have discovered that it is not so much the filter expression (which is optimised) that is soooo sloooow but the refresh on the navigation bar buttons. The main cause is the checking for 'Top of form' using:
>>
>>SKIP - 1 &&&Offending line takes over 30 seconds to execute
>>If BOF()
>> *---Code goes here---*
>>Endif
>>SKIP 1
>>
>>Does anyone please have any good ideas of getting round this?
>>
>>Many thanks
>>
>>Ian Baxter
If it's not broken, fix it until it is.
My Blog