Rangie not been used of late except for short runs - consequence, a flat battery. Really flat, so much so that the doors wouldn't unlock on the fob. Having gained entry using old fashioned 'key-in-the-lock' method the vehicle was completely dead - no ignition, no interior lights, no fault displays, nothing. Removed battery and re-charged. Re-fitted battery and engine immobilised and key activation lock-out displayed. Out with security card but no matter how I tried to enter the key activation via the key and lock I could not get the alarm to switch off so lots of noise and a non starter! All the doors remained locked and would not open except the driver's using the key (to another blast of noise - alarm works well though .......... although neighbours might not think so!). After a long and painful process of trying everything I could think off I finally checked all the doors again and the tailgate which, to my surprise, opened. I shut it firmly and, more in hope and desperation, entered the key activation code again. All doors popped open and key re-synched immediately it was put in the ignition. I can only assume that the tailgate lock had not quite fully operated when the battery was so flat and this confused the BeCM which refused to sort things out until, I presume, the tailgate being slammed shut rattled the lock and switches into the correct position for it. So, for those who experience problems with key activation codes, make sure all dooors etc. are properly shut!