It will if you assume that all the sperm are killed by it. But that's not always the case. Sometimes, one of those li'l buggers survives the ordeal and makes it to the oviduct. And it only takes one...
We're not so hot on the foams, jellies and spermicidal lubes. A lot of people are allergic to them. Spermicide is a detergent. It kills sperm by tearing up their cell membranes. It can also tear up the cell membranes in your vagina. Rips and tears in the vagina can make a woman extra-susceptible to infection by STD-causing pathogens. Research in S. Africa showed that female prositutes were more likely to contract HIV if they had been using spermicide. It was a very scary finding!
So your best bet (next to not having any sexual contact at all) is to use a regular latex condom, non-spermicidal water-based lubricant, and to take birth control pills. Even if you are on the Pill, it is of utmost importance to use condoms as well -- Pills can fail, always have a backup!
"In God we trust. All others must pay cash..." faw-choon kookie say.