Results 1 to 2 of 2
  1. #1
    kevinnice is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2012
    Posts
    10

    Question Which LABEL was clicked?

    HI.


    I have a form in ACCESS 2007 which (among other things) a series of LABELS name Label1 thru Label50.
    Each has an ONCLICK event which calls the same SUB.
    Within this SUB i need to know which of the LABELS was clicked.

    Any ideas how I can retrieve this? Either in the ONCLICK sub or later in the code?

    I should add that the Label.Caption of each of these Labels is set to the same value. What I need returned is the NAME of the Label ie "Label43"

    Thanks
    Kevin

  2. #2
    kevinnice is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2012
    Posts
    10
    I found the answer guys.

    In each ON CLICK sub I just set a public variable to Labelxxx.name, then go to the common sub knowing the calling Label number.

    Thanks.

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

Similar Threads

  1. Replies: 3
    Last Post: 09-14-2012, 03:35 PM
  2. Dlookup when yes/no box clicked
    By whojstall11 in forum Programming
    Replies: 2
    Last Post: 09-05-2012, 11:40 AM
  3. Replies: 1
    Last Post: 02-17-2011, 06:23 AM
  4. Autonumbering when a checkbox is clicked?
    By kutehart in forum Forms
    Replies: 1
    Last Post: 08-02-2010, 09:03 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