I tried to remove a formatted search using the below code.
if oFS.GetByKey(code) then
Although the formatted search has been removed from CSHS table but the field still attached with magnifying glass. When I clicked the magnifying glass, it prompt whether I want to assign a formatted search.
What I try to achieve is on certain condition, I assign a formatted search otherwise I use ChooseFromList on the same field.