Judgment unanimously affirmed. Memorandum: Defendant contends that County Court erred in denying his motion to dismiss the indictment on the ground that he was not provided independent counsel at the preliminary hearing. The record shows that a Wayne County Assistant Public Defender represented both defendant and his codefendant at that hearing. The Public Defender’s office subsequently declared a conflict of interest in representing both defendant and his codefendant. Defendant *973was provided new counsel, who moved to dismiss the indictment on the ground that his client did not have independent counsel at the preliminary hearing. The court denied the motion and defendant pleaded guilty prior to trial. By pleading guilty on the advice of competent counsel, defendant has forfeited his claim of inadequate representation at the preliminary hearing (see, People v Pentgen, 55 NY2d 529, rearg denied 57 NY2d 674; People v Bethany, 182 AD2d 1084, lv denied 80 NY2d 828; People v Cance, 155 AD2d 764; People v Knapp, 122 AD2d 305, 306). (Appeal from Judgment of Wayne County Court, Parenti, J. — Robbery, 1st Degree.) Present — Denman, P. J., Lawton, Wesley, Doerr and Balio, JJ.