Hello there, the 8640B is a classic HP design, but the rotary switch fingers breeak off and the plastic gears eventually all break.
Re switches, Very difficult to get reliable connections, as PCB or fingers can have oxidation or poor tension for contact. Get complete service manual and see switch schematic and mechanical. trace the faulty contact.
Gear replacement ...very complex mechanical, Ram in India sells replacement brass gear sets for $55
Life of the old white gear is extended by judiciously reduced speed and number of rotations of band switch, level attenuator, modulation rotary switches.
Bon courage
Jon
See the many sites on 8640B restoration.