Main key doesnít open/ close the car on a distance. To open/ close the car I need physical key.

BMW partner advised me to buy a new key and they did programming but the key still doesnít open/close the door on a distance moreover sometimes I canít start the car. Sometimes its work sometimes is not.
So BMW partner proposing me to change the lock and doesnít guarantee me that the problem will be solved, So I decided to investigate myself.

On both keys I have changed the batteries.

Please kindly help me.