Close a combobox in code?

brianjessup

Registered User.
Local time
Yesterday, 16:28
Joined
May 25, 2003
Messages
36
I have a combobox that on the MouseDown event checks to see if it is Null or if there is previous data in it. If there is previous data in it, a pop-up window comes up giving the user some choices in what they are trying to do. All of the "change" options work fine. They return a value to the main form's code which is used in the combobox's AfterUpdate event to determine what to do with the change in the combobox. However, there's a cancel button on the pop-up form too. It works ok, but after the pop-up form is closed, the combobox still has the list open.

So in general how do you close the drop-down list on a combobox?


Thanks!
 
usually by making a selection or moving focus away. I have never, but you might be able to control it with ListRows (usually defaults to 8).
 
docmd.cancelevent will cancel you out of the event and thereby close the drop-down.

Thanks!
 

Users who are viewing this thread

Back
Top Bottom