J
joecool1969
I have an app that has several controls. One is a TextBox where the
user must enter the name of a View in a database, and the next control
is a ComboBox. I want to verify that the name of the view the user
entered is a valid view name and if not, set the focus back to that
textbox. All well and good if the user tabs out of the textbox and
focus shifts to the combobox, I perform the check in the textbox's
Leave event. Now if the user clicks on the combobox's dropdown, I can
perform the check in the combobox's DropDown event. But here's the
rub. If the value for the view is invalid and I set focus back to the
textbox, the combobox's listbox is still visible. How do I force the
dropdown to re-hide the combobox's listbox?
user must enter the name of a View in a database, and the next control
is a ComboBox. I want to verify that the name of the view the user
entered is a valid view name and if not, set the focus back to that
textbox. All well and good if the user tabs out of the textbox and
focus shifts to the combobox, I perform the check in the textbox's
Leave event. Now if the user clicks on the combobox's dropdown, I can
perform the check in the combobox's DropDown event. But here's the
rub. If the value for the view is invalid and I set focus back to the
textbox, the combobox's listbox is still visible. How do I force the
dropdown to re-hide the combobox's listbox?