Results 1 to 3 of 3
  1. #1
    Bradex is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2011
    Posts
    101

    Question Creating a label which changes when each tab is clicked

    I have a tabbed form. I want the label above it to change when each tab is clicked.

    Something similar to here: http://www.datapigtechnologies.com/f...abcontrol.html

    I have done this:

    Private Sub MYTAB_Change()
    Select Case MYTAB.Value
    Case Is = 0
    Me.MYLBL.Caption "WRITE YOUR TEXT HERE"


    Case Is = 1
    Me.MYLBL.Caption "WRITE YOUR TEXT HERE"


    End Select
    End Sub



    I replaced the MYTAB with the name of my tab.

    I am not sure of the MYLBL. Replacing it with the name of a label e.g. 'Text0' does not work

    Can somebody help me please!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    you are correct but, you forgot the equal sign

    MYLBL.Caption = "WRITE YOUR TEXT HERE"

  3. #3
    Bradex is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2011
    Posts
    101
    Oops! Many thanks ranman256!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 04-25-2014, 11:41 AM
  2. Which LABEL was clicked?
    By kevinnice in forum Programming
    Replies: 1
    Last Post: 12-12-2012, 06:57 AM
  3. Replies: 3
    Last Post: 09-14-2012, 03:35 PM
  4. Dlookup when yes/no box clicked
    By whojstall11 in forum Programming
    Replies: 2
    Last Post: 09-05-2012, 11:40 AM
  5. How to pass what was clicked to module?
    By nichojo in forum Modules
    Replies: 11
    Last Post: 07-22-2010, 08:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums