Where are the ants? If you are just having a problem with a few black ants coming indoors, say, into your kitchen, first make sure you've cleared up any food debris (especially spilled soft drinks or dropped sugar) and then ... they swear by this in Australia, run a little talc across their path where they come in (if you watch, you'll see they all follow the same line). This doesn't kill them but they'll avoid the talc as they cannot walk through it and it gums their legs up.
If it's anthills in the garden that's the problem (usually red ants) then as far as I know, the only way is to keep the area well-watered. They build their anthills up to avoid the dampness of the soil, but will go elsewhere if it's always wet.