For some reason the TeamTask property doesn't get updated if it is the only property that was changed.
This happens in the underlying API and not in Basic4ppc code.
One workaround is to change the Body property and then return it to the original value:
Code:
mytask.TeamTask = false
temp = mytask.Body
mytask.Body = ""
mytask.Update
mytask.Body = temp
mytask.Update
BTW, you can replace your loops with:
Code:
i = tcol.FindItem("Subject","AAAAAAAA")
If i > -1 then
mytask.value = tcol.GetItem(i)
End If