It is the one created by the switchboard manager. I followed your
instructions, and it worked great, except that each page has the same name as
the first page even though I named them differently.
When you click a button and go to a sub-menu, how do you go back a page?
Right now, I have to close the switchboard and start over.
1) You can make changes in the coding of the switchboard to identify
which switchboard menu is active and change it's label accordingly.
You have to identify the current SwitchboardID in the
Sub FillOptions()
and then change the label captions according to the ItemText value.
Here is an example of the changes to the Sub FillOptions() that
will change the label caption according to which menu page is active.
The caption will change to whatever you have named that menu page.
Open the switchboard's code window and find the Sub FillOptions Sub.
Drop down a bit further until you come to
If (rst.EOF) Then
Change the code from that line to the end of that Sub so that it looks
like this:
(Watch out for improper message text wrapping.)
If (rst.EOF) Then
Me![OptionLabel1].Caption = "There are no items for this
switchboard page"
Else
While (Not (rst.EOF))
Me("Option" & rst![ItemNumber]).Visible = True
Me("OptionLabel" & rst![ItemNumber]).Visible = True
Me("OptionLabel" & rst![ItemNumber]).Caption = rst![ItemText]
rst.MoveNext
Wend
Label1.Caption = Me.ItemText
Label2.Caption = Me.ItemText
End If
' Close the recordset and the database.
rst.Close
Set rst = Nothing
Set con = Nothing
End If
===========
As far as going back to the first page menu, add another item to the
second switchboard, using the manager, to Go to SwitchBoard and enter
the first page name.
This is a Switchboard created by the Switchboard Manager is a
complicated method for what is really an easy problem.
You would be far better off creating your own switchboard(s) using
unfound forms. Add whatever command buttons you need. If you use the
Command Button wizard, Access will write most of the code for you. You
will have more control over what the switchboard will do, how it will
look, and maintenance will be much easier.