How to stop my ford explorer from alarming?

I have a 2002 Explorer and the alarm keeps going off at random times. It is something to do with the drivers door, because if I leave it unlocked and the others locked, then the alarm doesn't go off. Any assistance is greatly appreciated.

Don't use the key fob to lock the doors. That activates the alarm system.

When the alarm goes off, does the dome light come on? If so, then the small switch inside the door that tells the computer if that door is opened or closed is probably out of adjustment. It's inside the door, back around the main door latch.

I would pull the alarm fuse