There's the normal Input commad that allows you to input numbers.
So if you make the keypad beside the door into an event the hero has to action key:
<> Input Number: 7 Digit, [0001]
<> Branch if Var [0001] is 1234567
<> Open Door
: Else Handler
<>
: End
<>
SO it uses the "Input Number" from page 1 of events. That input number is then stored as a Variable, in this case variable 1 - say the password is 1234567.
The Conditional Branch then checks to see if the Variable [0001] equals 1234567. If it does, it opens the door.
Btw, with the Input Number event you can only have 7 digits.
----
As for letters as well as digits, I don't know if you can. If you can, then expect BC to jump in with the answer.
EDIT: Methinks "Key Input Processing" can be used as well - as long as it's stored as a variable again.