It's not that simple. You need to look at your lease and see if there are any clauses relating to the sale of the building. You also need to know if the place is rent stabilized (or if it should be). I'd honestly suggest going to see an attorney with a copy of the lease and see what they think. There may be some ways to negotiate with the Landlord now to see if you can't secure a better deal. Hope this helps!
I have a lease and know he can't raise it while my lease is valid. I am nervous though as I found this place cheap, but he is complaining that it is way under market value. He has already raised the building next door by $500.