Fiddling with the battery on a P38 does nothing other than cause you to have to reset all the windows and sunroof, if you have one, it does not reset anything else. CDL switch in the drivers latch is faulty and doesn't always operate. Change it now before it locks you out somewhere inconvenient. Also make sure you have the EKA code if it has one. Using the key is intended as a back up only for use if the fob fails, it was never designed to be used all the time so is only just strong enough. Have you tried syncing the fob? As long as the LED lights when you press the buttons, put the key in the drivers lock, turn to lock, hold there, press and hold the lock button on the fob until the LED starts to flash quicker. Release button on fob, turn lock back to centre then do the same with unlock. It might not work if the microswitch is playing up but will once you have changed the latch.