yes, you have to leave it on for a while. It can take anywhere from an hour to several hours before the message code will appear again. If you don't have the correct code contact your dealer for it.
I hate to admit it but "been there done that". I was trying to enter the code from memory and after several attempts it wouldn't accept anything. Just leave it on for a while and it will come back.