keypad and lcd interfacing

Hello everyone!
I was going to run a motor for about a time and then turn it of. the time i want to enter from the user by using 3x4 keypad. I am is doing good,but the problem is the keypad doesn't wait for me to enter the next key and moves to next instruction.
i wants a code with which it waits to get input from keypad and after entering 3 numbers it move to next instruction not before. please help me.
here is the code am being used

JULY_23A.ino (3.77 KB)

Count = 0
While count < 3
Get the keypad input
Save in key(count). //array to save keys
Increment count
End while loop

Continue processing

Weedpharma

Have you seen the Keypad library?
http://playground.arduino.cc/Code/Keypad