Multiple screen LCD

Good day
I am beginner in arduino and I have small project
I am using LCD and Keypad
Easiely I make LCD displaying 4 pages using 2 pushbuttons up and down.
I use Switch case for LCD programming.
I need to make the fourth page for entering values using keypad
The problem is that the programe stucking at the fourth page and can’t display the other pages.
Please your help.

the code i use is:

case 4: { //Design of page 4

lcd.setCursor(0,0);
lcd.print("Enter var1: ");
lcd.setCursor(0,2);
var1 = GetNumber();

lcd.clear();
lcd.setCursor(0,0);
lcd.print("Enter var2: ");
lcd.setCursor(0,2);
var2= GetNumber();

}
break;

}//switch end

int GetNumber()
{
long num = 0;
char key = kpd.getKey();
while(key != ‘#’)
{
switch (key)
{
case NO_KEY:
break;

case ‘0’: case ‘1’: case ‘2’: case ‘3’: case ‘4’:
case ‘5’: case ‘6’: case ‘7’: case ‘8’: case ‘9’:
lcd.print(key);
num = num * 10 + (key -‘0’);
break;

case ‘*’:
num = 0;
lcd.clear();
break;
}
key = kpd.getKey();
}
return num;
}

What changes the case number so the sketch can get out of case #4?

Please read the "how to use the forum-please read" stickies to see how to post code.