You did not specify the code was for the transmission so it was mistaken to be the engine code which is the throttle position sensor and this item can also cause erratic gear shifting.
Code 7 for the transmission system is a fault with the Shift Solenoid A. Symptoms would be as described, shifting from 1st to 4th and gets stuck in 4th.
The component is located rather low on the trans and quite often the connector gets contaminated resulting in bad continuity. Disconnect the connector and check for oxidation of the terminals. If any found, special attention has to be taken while cleaning as improper cleaning would result in the problem recurring after some time, if not immediately.
Here are the diagnostic procedures.
Monday, July 27th, 2009 AT 7:22 AM