Problems with foundset and forms

Good morning from the warm Canary Islands.

I do not know if this is a bug or not but it is driving me crazy.

I have a form (invoices) that is shown in a tabpanel in the customers form through a relation. So far so good, that works fine.
Now the weird thing. That form is also shown as a form itself, not based on any relation.
The problem is that if I first show the customers form and then I go to the option that shows this form (invoices), the records being shown are only from the customer relation.
If I do a new search(true,false) in that form (invoices) not in the tabpanel, the search works only with the record from the last search.

If I do the steps backwards I get the same problem, but the form shown in the tabpanel is not showing the related records but the records I left before exiting form 2.

The solution could be creating two different forms, but I prefer to avoid that.

Any clue on this?

Thanks in advance.

Because the way you do it, the form becomes an related foundset!

try ty fiddle with: foundset.unrelate()
(for instance when you show it in the onShow() and only when the form is not related! )