Accrington manager John Coleman endured a disappointing 400th league game in charge as Rochdale came from behind to win 3-1 on Sunday.
The home side made a dream start when, with less than a minute on the clock, John Miles unleashed a 20-yard volley into the top corner of the net for his first goal of the season.
But Rochdale came into the game towards the end of the first half and Miles then turned villain, bringing down teenager Will Buckley just inside the area.
Adam Le Fondre belted the penalty into the net for his fifth goal in five games against Stanley.
Winger Buckley then showed why scouts from higher divisions are watching him by stealing the ball from Chris King in the area and rifling into the far corner.
Jordan Rhodes, on loan from Ipswich, made the game safe in injury time following a goalmouth scramble.