BTW Hilmar
It is often faster to LOCATE instead of GO TOP after SET FILTER.
>>i have textboxes in page 4 of my page frame whose controlsource are based on fields of table borrow.
>>
>>in form.init() i have set filter to empty(borrow.rdate). after delete and pack, i also want to filter the records to empty(borrow.rdate).
>>
>>but this does not happen after delete and pack, even if i put set filter to empty(borrow.rdate) after the pack.
>>
>>what should i do?
>
>After a SET FILTER, you will still be on the same record, even if it is excluded in the filter. You should:
>
>
>set filter to ...
>go top
>ThisForm.Refresh()
>
>
>As Mike says, it isn't convenient to PACK every time you delete. This is slow, and doens't work in a multi-user environment. You should do the PACK for all tables once a month, at midnight or over the weekend.
>
>Since you will then have deleted records, use SET DELETED ON to hide the deleted records.