solid state. This is because the ions are not free to move about.
However, when an ionic compound is melted
(molten) or dissolved in water (aqueous) , it can conduct electricity. This is because the ions are free to move in the molten state or in aqueous solution.