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.
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.
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.
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.
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