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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make the Switchboard Title = the Swithcboard Caption

Choosing the Correct Forum

Make the Switchboard Title = the Swithcboard Caption

by  RobPotts  Posted    (Edited  )
Hello,

Rather thatn have loads of Forms as Menues I decided to stick with switchboards once I learn that you could use more than 8 items and customise the look of the switchboard.
see Thread700-174910

But I wanted the title of the Menu to change for each new page. To do this I decided to link the title to the cation of the switchboard which I noted did change. To do this:

1. Open the switchboard in design view.

2. Add unbound controls. Format these as you want them to apear on the form as the tile (I formated two controls the same as the 2 labels which are automatically created with the switch board)

3. Delete the original switchboard labels

4. Open the code for the form and Find the on current code, it will look like

Code:
Private Sub Form_Current()
' Update the caption and fill in the list of options.

    Me.Caption = Nz(Me![ItemText], "")
    FillOptions
       
End Sub

5. Add the following, for each control to this code

Me.[Color Red]Name of new Control[Color Black] = Nz(Me![ItemText], "")
FillOptions

You should now have a Switchboard Title that changes with each new Page.

I hope this help some of you
Rob![Bigcheeks]
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top