Turning off the mains supply is only half the battle. Most alarms are equipped with a battery backup to offer continued protection during power cuts, and to retain the memory.
You will need to turn off the mains AND disconnect the battery for a while. Be warned, once the power is reapplied you may discover the alarm has forgotten everything - including your code(s).
If the above does not work then your alarm is probably equipped with non volatile memory and will need to be professionally repaired.
Colin
October 2007