Evidence would suggest there is a wiring error. Recheck the wiring and all the connections - something is not connected, or is connected incorrectly.
Since you claim to have tested that there is power to all the fixtures, one of two things is probably the case:
- There is a high resistance connection which allows you to see voltage with a tester, but which causes the voltage to drop drastically as soon as a load is applied.
- You have managed to get both hot and neutral hot, so voltage is present, but there's no voltage across the devices, as they are connected to hot on both sides.
As you might imagine, it's difficult to troubleshoot these things from afar. Doublecheck everything.
You probably know this already, but the purpose of a switch is to break the "loop" of electricity that feeds the lights.
Find out where all your wires come from and go to, draw a picture of the circuit and that should narrow down your problem or at least help you in describing your problem to someone who could help you. Drawings are very helpful for issues like this.
From your description, it sounds like the black (hot) wire to the original light was not switched, but the white (neutral) wire was the break in the circuit via the switch. If you wired your can lights up with this in mind, and things still did not work, then there is something else going on that you need to do some investigating to see why your original assumption of where the wires go to/from failed. One of those wires doesn't go where you think it does, or the white/red wire that goes through the switch is not in the same "loop" as the black wire (not likely, nor really possible, but not impossible).
This might be a good opportunity to put the light and the outlets on different circuits. I think that may even be required by code. (ThreePhaseEel suggests that this is only required in bathrooms and kitchens, not necessarily for bedrooms.)
One way to check if you have the same wire (or branch of a circuit) at both ends is to flip the breaker, ground one side of your wire in question to something grounded (pipe, conduit, green ground wire, etc.) and measure with a multimeter that you have 0 Ohms of resistance to ground at the other end (i.e. place one probe on your wire and the other probe on somethign that's grounded...pipe, conduit, green ground wire, etc.). undo the ground and your resistance should go to infinity (or OVLD or something similar). There are also helpful circuit finding tools that would do this same trick...check amazon.
Best Answer
I'm assuming you're using an NCVT. If you "have power" and it doesn't work, you've lost the neutral somewhere.
Check all the connections inside the housings:
Near the bottom of a standard can light there are three screws. Remove them and the entire inner tin-can should pull down out of the ceiling. This provides you access to the junction box that is part of the lamp; where its connections are that you need to inspect.