in a method for electrocoating an electrically conductive surface serving as an electrode , which method comprises passing an electrical current between the electrically conductive surface to be electrocoated and a counter electrode in contact with an electrodeposition bath comprising a synthetic resin ionically dispersed in an aqueous medium , wherein improvement comprises adding a complexing agent , and then removing at least a portion of the complexing agent along with metals coordinated therewith from the bath .