Check your fuses. Also, check if all four locks go up and down. And also check the trunk. There were threads here that told of old damaged electrical wires leading to the trunk lock that prevented the car from being locked.
I also had a similar problem where a blown 7A fuse prevented me from unlocking all doors from the passenger side. So I got one lock-unlock cycle before locking for good.