Solved

Combo boxes - can they be programmed to "undropdown"?

Posted on 2011-02-17
5
366 Views
Last Modified: 2012-05-11
Hi experts,

I know that there is VBA code that will drop down a combo box - cboField.dropdown.

Is there a way to do the reverse action?  For example, if the combo box has been clicked, the list of contents of that dropdown will be displayed.  I then have a message box that comes up when an item in that drop down is selected.  I would like to close the drop down if possible.

I know that this question will probably baffle people as to why I need this, but it is much harder to explain why.

Regards

Terry
0
Comment
Question by:TerenceHewett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 19

Expert Comment

by:MINDSUPERB
ID: 34916362
Can you elaborate further?

As I know when combo box got focus, the list drop down using "cboField.Dropdown" and when you select an item from the list, the dropdown closes. This already happens.

Sincerely,
Ed
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34916378
<I would like to close the drop down if possible.>

you don't need any codes to close the drop down,  
the normal behavior of the combo box is to close the drop down box when an item was selected...
0
 
LVL 10

Expert Comment

by:VTKegan
ID: 34916527
If you are stating that you want the combo to close before the message box comes up.  Make sure that your message box is being called in the AfterUpdate event of the combo box.
0
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 34916583

   SendKeys "%{DOWN}"

  if the combo is down will push it back up.

JimD.
0
 

Author Comment

by:TerenceHewett
ID: 34916749
JimD, your solution was spot on.  Thank you very much.

Thanks also to all others who have posted their thoughts.  Its always much appreciated.

Regards

Terry
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question