When this sort of thing happens to our car, my first port of call is to undo the connector in the door hinge and spray the contacts with cleaner. Then check that there is power etc. there. Should be if the door locks work, but theres a signal cable to the door module (part of the switch pack).
If that doesn't work you will have to get the door panel off and check the wiring to the motor.