If you SET DELETED ON before you run the query, then remove the !DELETED() from the query, does it work properly? That is what Craig and Liam are trying to tell you...
>Ok Liam...
>
>The other query:
>
>&& Delete type's holidays.
>Delete From BuyHolidays Where idBuy == BuyType.idBuy
>Delete In BuyType
>
>&& Go to top and reload the holidays.
>Go Top In BuyType
>Select * From BuyHoliDays ;
> Into Cursor curHolidays ;
> Where idBuy == BuyType.idBuy And !Deleted('BuyHoliDays')
>...
>...
>After this, the curHolidays is empty, but if I quit of the form and open it again the query work fine. And there are more than one Holiday in the table for the first BuyType (go top).
Steve Gibson