Borax dissolved in sugar syrup basically does the same thing to ants in general. The Terro ant traps are prepackaged with such syrup. The ants bring the not-really-food back to the nest, they gorge on it, the borax crystallizes inside them, and they get ripped up from the inside.
It’s a bit slow-acting, but it works wonders when the ants invade in the spring.