in a method and a device for determining a reference position of a locking part moved by an electric motor , the locking part is moved in the direction of the closed state thereof , until the same reaches a stop position . at that location the meter reading of a position meter describing the stop position is detected and buffered . subsequently a movement of the locking part is carried out in the direction of the opened state thereof . the locking part is then moved again in the direction of the closed state thereof , until it again reaches a stop position . at that location a meter reading describing the stop position is detected , and compared to the buffered meter reading . if both meter readings agree , the first stop position is determined as the reference position . the method and device can be utilized , for example , for power window lifts and sunroofs of motor vehicles .