Sounds like you have a bad connection of a fault in GEM
DESCRIPTION & OPERATION
NOTE: For power door lock testing on Expedition, see the KEYLESS ENTRY SYSTEM - REMOTE article.
Power door lock system consists of power door lock switches, relays, door lock actuators, power door lock control module (Aerostar) and necessary wiring. Explorer and Mountaineer also uses a Generic Electronic Module (GEM) to control body and engine electronic controls. Switches are located in front door armrests or door trim panels.
To lock all doors, press switch on either door to lock position. To unlock all doors, press switch to unlock position. Side and rear doors (if equipped) are also controlled by power locks. Exterior key lock will only lock or unlock that individual door. Exterior key lock will not operate all door locks from outside vehicle unless equipped with Keyless Entry system.
NOTE: For trouble shooting information on GEM equipped vehicles, see appropriate MODULE COMMUNICATIONS NETWORK article.