Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switchboard and Command Buttons 2

Status
Not open for further replies.

janetlyn

Technical User
Jan 29, 2003
516
US
I have a switchboard five layers deep. By the time someone has gotten to the fifth layer and done what they needed, they do not want to click five times on the "Return to Previous Menu" button I have made on each page. I would like a command button for "Return to Main Menu". However, I cannot figure out what the "name" of the main menu is to tell it to go there. I know this is easy, but my brain just won't work around it. Thanks for the help.

Janet Lyn
 
In Design View of the "Main Menu" you can select from the Access Menu - File->> SaveAs, this will give you the name of the Form.

Or you could temporarily add a Command Button, in the on click event:

MsgBox Me.Name

Good Luck

Bill
 
Okay, neither of those will work. Well, the Message, what is my name will, but the form's name is Switchboard. However, the "focus" of the switchboard is the menu it just left, which is the previous menu. So if I create a command button (using the wizard for us VBA deficient folk), select open form, my only option is "Switchboard." But, as I stated previously, it will only go back to where is was the last time it was used so do you have any other suggestions? Thanks so much, Janet Lyn
 
Why not create a MAIN MENU button in each of your switchboard menus. That way, when you send the user back to the menu, they take the Main Menu option.. Hope this makes sense from a newbie..

Tekay
 
I'm lost,

If you still need help after Tekay's good suggestion, why not post your code so that we can see what you mean by "Focus" etc.

Bill

 
I messed with my own switchboard and now it no longer works, so I can't even test this now.

But my main SBoard has (default) after it in the Switchboard Manager, so any "other" switchboard pages that I want to return to the main page, I add a new command, have it "Go to Switchboard" and then select the main SBoard. Of course, in that list it no longer has default after it, which may be the basis of your problem. You could always just try each Sboard to see where that leads...though with five layers that would take awhile.

Really though, I'm not sure how to get a switchboard to open up the previous page, so perhaps I'm not even talking about the right thing. Did you use the Switchboard Manager to create it? What version are you using?
 
Okay, now I'm confused. XP/2002. I think I will take Tekay's suggestion. I already have it set up so they can go back to the previous window, just not the Main Default window. So I will have to have both in each layer. The only problem is I have used all 8 slots in many of my layers. However, I believe I have seen quite a few threads addressing this issue so I will go find them and read them again. Thank all of you for your suggestions.

Janet Lyn
 
Open your "Switchboard Manager". Add a new option to each menu for "Main Menu",(except for your default SB). Set each main menu option to open a switchboard with the name Main Switchboard, (or whatever you have your default switchboard is named). That will take you back to the main menu every time.

Clint Galliano
Halliburton Energy Services
BAROID PSL
"Done ONCE, Done RIGHT!"
 
Milcman, thank you for your help. That will help in most menus and I did add it to my switchboard and it works. However, as stated above, most of my 8 slots are already being used. I think I have decided to make my own switchboard by just using forms. The only problem I have with that is when you push on a button to open forms and you want it in the add mode, or if you want it in the edit mode. I don't know the code to tell it to go there. Thanks again. Pink stars to you. JL
 
I hadn't realized there were only eight slots available. Or how confusing my post above was.

You can use a macro to open forms, and in the Action Arguments section for the OpenForm command, you can select which mode: either "add" or "edit", for the form to open in.
 
Thank you box, that will work perfectly. Pink stars for you to. JL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top