Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2003
    Posts
    4

    Unanswered: How to display switchboard name?

    I am looking for a way to display the name of the switchboard on the form. I noticed when you click on a buton to take you to a new switchboard the name appears on the title bar in MS Access, but how do you get it to appear on the form?

    Thanks for the help!
    Wes

  2. #2
    Join Date
    Jun 2003
    Location
    UK
    Posts
    68
    Enter the name you wish to be diplayed in the Caption property of the Forms properties. This will then display the name in the Haeder area of the form.

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ...and you can also read the .caption so

    LabelOnTheForm.caption = me.caption

    izy

  4. #4
    Join Date
    Sep 2003
    Posts
    4
    Ok I tried the first suggestion - no luck. Nothing appears in the header section.

    And when I type (label LabelOnTheForm.caption = me.caption) in the caption box of a label, it simply displays what I have typed. What am I doing wrong?

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    in the Form_Load event type

    LabelOnTheForm.caption = me.caption

    ...replacing "LabelOnTheForm" by the real name of the label (which you find in Properties/Other/Name)

    izy

  6. #6
    Join Date
    Sep 2003
    Posts
    4
    OK gotchya...I got it to work, but there is a problem with that approach.

    The same caption is displayed on all the switchboards. ie) Since I have "Main Switchboard" as the name of the caption this doesnt change, as you change switchboard.

    For example, on the main switchboard, I have 3 buttons Asset Detail, Reports Menu, and Query Menu. When I click on Reports Menu, I would like the name Reports Menu to appear as the name of the Menu you are on....but instead "Main Switchboard is appearing as the name for all menus/switchboards

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ok - you don't want the text set on form load but rather to change when a button is pressed.

    so ignore the form load event.
    instead find the _Click event of each button and in there type

    LabelOnTheForm.caption = "Asset Detail"
    ...replacing etc etc

    or if you want the text up on the window title bar:
    me.caption = "Asset...."

    izy

  8. #8
    Join Date
    Sep 2003
    Posts
    4
    Thanks for your efforts Izy....i used your ideas to find the answer.

    Here is what I did.

    On just one of the switchboard buttons I built the following event in the On Got Focus event field:

    LabelOnTheForm.Caption = Nz(Me![ItemText], "")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •