Louis, read the P1031 thread, in particular, the most recent posts, since beginning of December. Unless the flaps pass the Set Point check, which is performed each time you start the engine, the error will be triggered. The check sequence is only initiated by turning the ignition on. If you clear the error, and start the engine, without switching the ignition off, the error will NOT be triggered again, until the next time the ignition is switched on, and the engine starts.
The only way to prevent the error is to fix the problem that is preventing the flap spindle moving from fully open to fully closed, (even a couple of degrees short of either will trigger the error). VCDS will show you how far, or if, the flap spindle is moving. Assuming the flap spindle is not moving fully, next task is to find out why. Could be the actuator, the linkage, or the manifold itself. Don't jump in and start taking things apart! You need to know exactly what the problem is, before you can start to fix it!
The P1031 thread has contributions from members who have done just that!
Mac.