I am trying to replace a lamp that hangs from the ceiling. The electrical box in the ceiling contains the main powere supply wires, one set for the wall dimmer switch and one set of wires for an electrical outlet on another wall. I've connected the black wire from the supply line to the black of the outlet as well as the black from the switch wires. I've connected one of the lamp wires (both are black) to the white wire from the switch. The other lamp wire has been connected to the white wires from the supply line and the outlet. All grounding wires are connected to the electrical box in the ceiling. However the light does not turn on but the wall outlet does receive power. What am I doing wrong? The continuity of the switch wires is good. Outlet power confirmed with use of an electrical meter as has the continuity of the switch wires. The light does work if connected directly to the main power, however it would stay on as long as the breaker is turned on. What am I doing wrong - am I missing something here.