This happened to me two months ago. I have a '94 525i, 185k miles. At first, when this happened, I was just low on Trans fluid, they put more in, and it ran great for 2 months. Then, it happened again two months, took it in for more fluid, they said you are full of fluid, time for a new transmission. I said okay, do it, how much? $1500. So I said okay do it. They couldn't find another transmission with less than 200k, so they said to rebuild it would be $2500... I said oh no. Took it to my old mercedes mechanic who works out of his house. He said he would rebuild for $1000, i said great do it! 40 days and $2000 later, I have my car back and my transmission working. They had tons of problems putting that car back together. When he rebuilt and put it back in they had no reverse, so they took it out, and put it back in, and for the next 3 weeks they didn't have power at all. They had to replace multiple "hard parts" as they called it, that had to do with the transmission. Apparently they had to reset the transmission computer with a BMW comp. Runs great now, still need a tuneup though.
Best of luck.