Ionic compounds do not conduct electricity in the solid state because the ions are held in a lattice and do not move freely. However, when they are melted or dissolved in water, they can conduct electricity. This is because the ions are free to move in the molten state or aqueous solution.