The complex lock has a housing, a number core, a key cylinder and a number detector. The number core, the key cylinder and the number detector are located inside of the housing. The complex lock can be unlock by a key and unlock number. When the unlock numbers are missed or forgotten, the number detector is able to find the unlock number again so that the complex lock can be unlock by the unlock number again.