Here is some stuff to think about.

The A/C compressor puts a load on the engine which of course slows it down. The PCM responds by trying to open the IAC to compensate and restore the RPM's. This will work as long as the mixture is correct. If it's too lean, not enough power is generated to keep the RPM's from falling.
So the A/C must be working and not put too much load on the engine.
The IAC must be working and not too restricted (TH fix).
The mixture must be correct. The mixture is affected by vacuum leaks, O2 sensors, the MAF, dirty injectors, and even the ECT.
Vacuum leaks can be external hoses, the PCV valve and fresh air hoses, the EGR valve, gaskets, or the intake tube between the MAF and TB.
The IMRC must also have the secondaries closed at idle.
If the CEL is on or has come on while driving, have the codes pulled and check the indicated problem first.