Appeals by defendant (1) from three judgments of the County Court, Nassau County (Harris, J.), all rendered April 29,1980, convicting him of two counts of burglary in the third degree and one count of attempted burglary in the third degree, upon his pleas of guilty, and imposing sentences, and (2) (by permission) from an order of the same court, dated July 24, 1980, which denied, without a hearing, defendant’s motion pursuant to CPL 440.10 to vacate the judgments. The appeal from the judgments brings up for review the denial, after a hearing, of defendant’s motion to suppress statements (Lawrence, J.). Judgments reversed, on the law, defendant’s motion to suppress is granted, the pleas are vacated, and the case is remitted to the County Court, Nassau County, for further proceedings consistent herewith. Appeal from the order dismissed as academic, in light of the determination on the appeal from the judgments. The People, with commendable candor, concede that the detective who questioned defendant knew that he had already appeared in court on the very same morning on a pending burglary charge. Had the detective been diligent and inquired as to whether the defendant had an attorney on that charge, he would have discovered that defendant was represented by counsel. Since the detective had actual notice of the pending charge, the officer was under an obligation to make such an inquiry (see People v Smith, 54 NY2d 954; People v Bartolomeo, 53 NY2d 225). His failure to do so, *879and his continued questioning of defendant, violated defendant’s right to counsel and the defendant’s statements must therefore be suppressed (see People v Bartolomeo, supra), and the judgments reversed. We have examined defendant’s remaining points with respect to the judgments and find them to be without merit. Lazer, J. P., Mangano, Gibbons and Gulotta, JJ., concur.