A full model number is helpful, but from the rest of the description, it sounds like the classic problem with many of the cord reels in Kenmores. The contacts wear and burn over time inside the cord reel and eventually lose contact. If it's the older canister (not Progressive or whispertone), then you have the old style cord reel, and it can't be properly repaired. It would need a new cord reel assembly.
www.vacuumcleanerhelp.com, May 2009