When an ionic compound is a solid, the ions in the ionic lattice are held together by ionic bonds. Due to this, the ions are not free to move around and so cannot carry a charge. When the ionic compound is molten, or dissolved in water, the ions are free to move around and carry a charge. This allows the ions to carry a charge when molten or dissolved in water.