Results 1 to 5 of 5
  1. #1
    PRHoff is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2015
    Posts
    7

    On Click Event with a combo box


    Hello,
    does anyone know of a way to create an on click event when an option in a combo box is clicked. My boss is looking for a text box to pop up with explanation when certain things are clicked in a combo box located in a form I designed.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Put code in the combobox Click event.

    If Me.comboboxname = "some value" Then
    MsgBox "message here"
    End If

    However, that won't trigger if user types into the combobox.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by June7 View Post

    ...that won't trigger if user types into the combobox...
    Actually, it does in v2007, when you move off of the Combobox.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    And so it does - should have followed through in my test.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    I wasn't sure, and had to check it, too! IMHO, the OnClick event for Controls is one of the most fickle events in Access! It doesn't fire when you 'click' on the Combobox...only when you make a selection. Up through at least 2007 (I think this may have changed with 2010 or 2013) it doesn't fire when you 'click' on the Tab of a Tabbed Control, only when you 'click' on a Page of a Tabbed Control. With a Label it works like it does with a Textbox or Command Button...unless the Label is attached to another Control...in which case the OnClick event doesn't even exist!

    Like I said...fickle!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Click event of form?
    By BLFOSTER in forum Programming
    Replies: 3
    Last Post: 04-25-2014, 11:29 AM
  2. Combo box on click event
    By crowegreg in forum Forms
    Replies: 13
    Last Post: 08-17-2012, 08:25 PM
  3. List Box Click Event
    By bginhb in forum Forms
    Replies: 3
    Last Post: 04-09-2012, 02:06 PM
  4. On-Click Event Procedure
    By tbassngal in forum Forms
    Replies: 6
    Last Post: 07-20-2011, 07:06 AM
  5. On-Click event transfer
    By nkenney in forum Forms
    Replies: 16
    Last Post: 03-26-2009, 09:02 PM

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