Rebecca,
Did they changed the entire fluid and the filter? Did you experienced a delayed engagement when you moved the shift selector?
Are you sure about the 040 code? Isn't it 048?
The 048 code is pretty common on these cars. It's caused by a defective seal inside the torque converter. In this case only the torque converter has to be replaced.
The other common problem is the valve body, but they usually sets 05x codes, but in this case too, only the valve body needs to be replaced.
It would be good to know the DTC for sure, but I'd get an ATF and filter replacement first, (correct ATF is extremely important!) reset the adaptation and see what will happen.
Zee