| Whiskey Jack |
Regarding targeting a swarm... "A swarm is immune to any spell or effect that targets a specific number of creatures (including single-target spells such as disintegrate)..." (from the PRD)
Regarding tanglefoot bags... "When you throw a tanglefoot bag at a creature (as a ranged touch attack with a range increment of 10 feet)..." (from the PRD)
So as hogarth pointed out, RAW makes it look like a "no". But I would agree with the idea that it might "do damage" to the swarm in that some of the hundreds (or thousands) of creatures in the swarm could be stuck/mired and thus reducing the strength of the swarm overall and making it harder to disperse. I would home-rule it to do 1d4 points, but that would be a sad waste of a tanglefoot.
Good idea though I probably wouldn't allow it in PFS.