PDA

View Full Version : How to insure that a Combo box is clicked on.



mud2
03-25-2006, 08:51 PM
I want to open a recordset based on a table. The table is chosen from a combo box. If a value in the box isn't cliked on an error is generated. How do I make sure that some value has been clicked on?

mud2
03-26-2006, 09:07 AM
I answer myself: STUPID! Change your approach (sorry!). Make your program dependant on a combo box click! Now I'll go try it!

TonyJollans
03-26-2006, 09:12 AM
I assume this refers to some other thread I haven't seen but I have to say I like the idea of insuring a combo box :) Against what, I wonder? Is there a gap in the market here?

Norie
03-26-2006, 09:21 AM
Just check the ListIndex of the combobox.


If Combobox1.ListIndex<>-1 Then
' a value has been selected in the combobox
' so let's go ahead with the code.
Else
Msgbox "Please select a value from the combobox"
End If

geekgirlau
03-27-2006, 02:16 AM
I assume this refers to some other thread I haven't seen but I have to say I like the idea of insuring a combo box :) Against what, I wonder? Is there a gap in the market here?

:rofl: Tony, a smart man could make a killing here!