Question: why do ionic compounds only conduct electricity when dissolved in water?
Answer: Ionic compounds conduct electricity when molten (liquid) or in aqueous solution (dissolved in water), because their ions are free to move from place to place. Ionic compounds cannot conduct electricity when solid, as their ions are held in fixed positions and cannot move.