LCD 16*2 display and multiple menus code

Hi, I am attempting to create an arduino program that can produce a main menu with 4 items/options (i.e. overspeed, resistance, manual control and item 4) which then each item derives into 6 different levels, each item has its own independent 6 levels. I can produce the main menu and print the list of the second set of menu options (submenu of 6 levels). I have only just started trying to create 6 levels for 1 of the items, but I can't seem to make the buttons work in the second menu, except for the "forward button". I have been trying to modify it, but I might have lost sight of what is what. Please if anybody can have a look at the attached code and give me a few pointers, it would be really much appreciated.

sketch_feb25a.ino (17.4 KB)

To be honest, you have written quite a lot of code and it is not the most attractive I have ever seen. I would suggest taking a step back and searching for some other people's code and seeing how they have solved the problem - reading existing (preferably good quality) code is frequently underrated. You should also try out some of the menu libraries that are available which could make your life a little easier.

Ideally you want your code to continuously flow through loop() without blocking in sub-functions; this allows you to have your sketch appear to do multiple things at once. By using constructs such as while (activeButton == 0) { ... delay(255); ... } you are causing a blockage.

Take a look at the forum sticky on Useful links with particular attention on Planning and Implementing an Arduino Program and State Machines.