Ion exchange resins were incorporated into hydroxypropylmethylcellulose (HPMC) matrix tablets to modify the release of oppositely charged drugs. The drug release from HPMC tablets containing drug-resin complexes was significantly slower than from HPMC tablets containing drug without resin. A physical mixture of drug and ion exchange resin (cationic drug, propranolol HCl, with the cation exchange resin, Amberlite® IRP 69, or the anionic drug, sodium diclofenac, with the anion exchange resin, cholestyramine (Duolite® ATP-143)) resulted in almost the same drug release as tablets containing preformed drug-resin complexes. Upon contact with the dissolution medium, a gel layer formed rapidly around the solid tablet core and the complex between the drug and the resin formed in situ within the gelled regions. No effect of pH of the dissolution medium (0.1 N HCl or pH 7.4 phosphate buffer) or resin counterion was observed with the strong cation exchanger, Amberlite® IRP 69. The resin was dissociated at both pH-values, allowing drug binding. With the weak cation exchange resin, Amberlite® IRP 88, in situ complex formation and retardation was only observed in pH 7.4 buffer but not in 0.1 N HCl because of the non-ionization of the carboxyl groups. The drug release depended also on the amount and particle size of the resin particles and the type of carrier. The use of smaller resin particles eliminated the burst release seen with larger resin particles. Upon comparing different carrier materials, a rapid formation of the gel layer was important for the in situ complex formation. The drug release was in the order of Gelucire 54/02 (glyceryl palmitostearate)>polyethylene oxide 400K>HPMC K15M.