On the back of an eight-match unbeaten run, the visitors started confidently as Kayode Odejayi went close with a header which Matt Duke saved, while Danny Webber was off target from a good position.
In between, Kevin Amankwaah headed wide at the other end, while Dallas was denied by Marcus Bettinelli as Northampton began to get on top.
It was the Cobblers who broke the deadlock in the 29th minute when Clive Platt and Danny Emerton combined to find Dallas, who beat Bettinelli with an angled drive.
Northampton should have doubled their advantage in the 36th minute when Izale McLeod was fouled by Michael Liddle in the penalty box but the on-loan MK Dons striker saw his ensuing spot-kick comfortably saved by Bettinelli.
Webber had an effort blocked, as did Odejayi, either side of the break as Stanley tried to get back on level terms.
Kal Naismith twice went close for the visitors in the second half and Webber was denied by Duke, while in between Dallas was off target for Cobblers.
Those opportunities apart, there were few other chances in the second period but McLeod went close to making up for his penalty miss when he hit the bar from 10 yards on the hour mark and Peter Murphy missed a great chance to equalise late on when he missed the target from close range.