A new set-membership affine projection (SM-AP) algorithm for adaptive filtering applications is proposed. The new SMAP algorithm eliminates the error-bound estimation problem of the conventional SM-AP algorithm. The poor tracking performance in nonstationary environments of the conventional SM-AP algorithm is also considered. A solution to this problem is proposed by incorporating a switching mechanism in the proposed SM-AP algorithm. The new SM-AP algorithm has better convergence efficiency and yields lower misadjustment than the conventional AP algorithm. On the other hand, with the switching mechanism it has better convergence efficiency and yields lower misadjustment than the conventional SM-AP algorithm in nonstationary environments.