Showing data of sensors in menubar form without using button on arduino tft

hello everyone!
I am very beginner at Arduino and also sensors. I want to show data of some sensors on different tabs on Arduino TFT. I have a menubar home page, and each sensor has its own tab. When the sensors are disconnected going back to the homepage is done correctly, however, while I connect the sensors to the board, just I can select one tab, and clicking the "home" choice inside the tabs do not work and I can not come back to the home page.
Capture2
part 1 is the function that checks if the "home" choice is clicked or not. So, part 2 which is going back to the homepage is not performed. Please help me do that :frowning:
Sorry for my bad english.

Post your entire sketch. Or, failing that, an MCVE.

...and post actual code, not pictures of code.

ok, here is the code of this part:
if (currentpage == 1)
{
while (BACK == 0)
{

valueN = LoadCell.get_units(1);

tft.setTextSize(3);
tft.setTextColor(RED, BLACK);

tft.setCursor(170 , 255);

tft.print(valueN);
tft.print("gr   ");

BackSelected();

}
currentpage = 0;
drawHome();
}
it should be noted that "currentpage=1" is equivalent to the tab of writing data of sensor and "currentpage=0" is equivalent to the homepage.