Well, the switch may not be the problem. But it may be. The best thing to do is to have it diagnosed before having parts replaced.
A tech will use a test light or voltmeter to check for power and ground at the switch and the motor. They will also inspect the mechanism inside the door (window regulator) to make sure it's not malfunctioning / bound up.