You do have to let the landlord in for viewings when the landlord is wanting to show the rental unit for other tenants or if the landlord is planning to sell the apartment or house.
The landlord must give you 24 hours notice though before the landlord can show the apartment or house to the new potential tenants or the new potential owner of the apartment or house.
The landlord cannot just show up without advanced notice and just want to go into the apartment or house and in that case you can refuse to let the landlord in.
But once the landlord gives you 24 hours notice about the viewings then you must allow the landlord into the apartment or house you're renting to show the place.
You should have been given advanced notice but if not then you can refuse to let the landlord in for the viewings.