You're best off stopping them before they get in.
The typical spray is good for interior baseboards, at entrances and under cabinets. It's not uncommon for them to come 'round in the spring and fall - and you should only have to treat a couple times before they disappear for the season.
If they are extra bad, you can use a granular perimiter treatment that you'll coat the ground with all around your house.
When this is the case at our apartments, we use
Spectracide Ant Shield Home Barrier Granules.