PMR spectra of carbonyl compounds 2a-k reveal significant variations in the population off and Z Isomers on changing the solvent from CDCl3 to DMSO-d(6). In non-polar media, the intramolecular N-H....O hydrogen bonded form is exclusively observed. In DMSO-d(6), the alternative Z form is also populated. A similar conformational switch is also noted in the corresponding thiones. Different interpretations are critically analysed. The most consistent explanation is suggested to involvean interplay of N-H....X hydrogen bonding and S...X attractive interaction (X=0,S) in these systems. Ah initio calculations support this interpretation.