@electronZ
As suggested by LvW, if you a r using the voltage controlled switch (S) then make sure you have a voltage source in the circuit once the switch closes. What ever voltage you decide to use on the left hand side of switch (control mechanism) has no effect on the right hand side of the circuit. That voltage (V1 in your case) is just controlling the ON/OFF state of the switch and has nothing to do with charging of capacitor.
Follow the circuit given by LvW and it should work!
-Hemanshu