Besides your mistake...

Using Set_Relate to change the / setup a relationship between tables is OK for one time operations. It has never been developed to change on the fly. For this we developed DDO or Local relationships. Read more about this in the https://docs.dataaccess.com/dataflex...ationships.htm article.