Key Memory 2000 BMW 740

,

I allowed the battery on my 2000 --740 BMW to drain. When I recharged the battery most of the memory functions, MPG, Avg speed, etc., were gone. That doesn’t bother me. The key, however will not remotely lock or unlock the car. How do I reestablish this link?