Control of intermolecular interactions is integral to harnessing self-assembly in nature. Here we demonstrate that control of the competition between hydrogen bonds and halogen bonds, the two most highly studied directional intermolecular interactions, can be exerted by choice of solvent (polarity) to direct the self-assembly of co-crystals. Competitive co-crystal formation has been investigated for three pairs of hydrogen bond and halogen bond donors, which can compete for a common acceptor group. These competitions have been examined in seven different solvents. Product formation has been determined and phase purity has been examined by analysis of powder X-ray diffraction patterns. Formation of hydrogen-bonded co-crystals is favoured from less polar solvents and halogen-bonded co-crystals from more polar solvents. The solvent polarity at which the crystal formation switches from hydrogen-bond to halogen-bond dominance depends on the relative strengths of the interactions, but is not a function of the solution-phase interactions alone. The results clearly establish that an appreciation of solvent effects is critical to obtain control of the intermolecular interactions.