The pill tray top has a key that can be used to lock it, but when you need a dose of medicine, the alarm and light will go off and stay in that position until the time for the next dose of medication.