Hmm, a tough one. Obviously something is jamming the door latch mechanism. Now, if you took apart the latch and disassembled the microswitch and PCB and motor etc. box, chances are you didn't put it back together properly, thus blocking the whole thing. To help you out here's a link to a nice DIY on door locks and repair thereof
http://www.taligentx.com/passat/maintenance/doorlockmechanism.html.
Also make sure that the door pin driving mechanism isn't blocked (I'm refering to that pendulum behind the door cover with two rods attached to it - one from latch mechanism and one that protrudes from the door and acts as door pin).
One more thing: inspect the lock-unlock rocker (the plastic+metal assembly with 2 springs on the door latch mechanism) that drives the door pin - mine was all crappy and dirty and that stopped the passenger door from operating properly. After I greased the enitre thing, it started working normally again.
Good luck with that and let me know what did you do.
Cheers
(Sorry if all this doesn't make much sense, but you know what it all looks like, so there shouldn't be any problems.)