This is a difficult issue. Finding a balance between letting the bee pursue its species-specific and health promoting behaviour, in this case swarming, and keeping colonies out of buildings is not easy.
I do relocations of colonies from buildings:
http://www.dheaf.plus.com/beeremovals/index.htm .
It can cost the owner up to $500 and that's if they don't have to hire scaffolding. But is it right to prevent species-specific behaviours just so one can keep bees in a city? Those who keep chickens, and even pigs, on the balconies of blocks of flats/apartments obviously see no problem in preventing species-specific behaviours.
As it happens, the bees in buildings problem is not confined to urban environments. The biggest densities of calls I get are in the vicinity of relatively rural apiaries of a dozen or so frame hives. These are people practising swarm control and doing so primarily to maximise honey yield.
Those who work with swarming could minimise the risk of infesting buildings by doing the following:
1. As Jacqueline says, give the bees plenty of space.
2. Position bait hives in suitable places
http://www.dheaf.plus.com/warrebeekeeping/bait_hives.htm .
3. Watch bait hives several times a day. They also serve as indicators of swarm issue or imminent issue.
4. Tell all your neighbours around swarm time that there is a reward (pot of honey?) for any swarm near your hive reported to you and give them your home/work phone numbers.
5. Have your swarm taking kit handy at all times and try to arrange to take time off work when swarms are issuing (it has been said that if a beek cannot be available at swarm time they should consider whether beekeeping is a suitable occupation for them).
6. Have a receiving hive ready at all times. If you already have enough colonies, have potential recipents of swarms at the ready.
Maybe others could add to this list.
This seems a better strategy than that of a frame beek I know with a dozen colonies on the edge of a nearby town who tells me that his colonies never swarm. He lives 15 miles away and does not get to hear about his colonies that I remove from the town's buildings or catch in my bait hive placed right in the middle of the town.