Solved

opposite of .dropdown

Posted on 2007-11-18
6
606 Views
Last Modified: 2008-02-01
hello,

how to close a combobox with code?

thanks!
0
Comment
Question by:Moother
  • 3
  • 2
6 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 300 total points
ID: 20307614
set the focus to other control.

me.othercontrolname.setfocus

the dropdown automatically hides once the combo box lost the focus
0
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 300 total points
ID: 20307618
to clear a combo selection
me.comboname=""
0
 
LVL 10

Assisted Solution

by:LennyGray
LennyGray earned 200 total points
ID: 20307679
as soon as you click your mouse, whether by selecting somethingfrom the combobox or when you click on another control the combobox closes.

In what instance does the combobox stay open in your application where you need ot to close?
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 3

Author Comment

by:Moother
ID: 20311003
@ lenny...

i have .dropdown on OnChange... when i click-select a value the combo doesnt close....

.dropdown is nice but not if it stays irritatingly open!
0
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 300 total points
ID: 20311918
moother

try moving the codes in the enter or focus event of the combo.
0
 
LVL 10

Assisted Solution

by:LennyGray
LennyGray earned 200 total points
ID: 20312081
is the OnChange Event a form event or a control event? Under what circumstances exactly do you want the combobox to drop down?
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

803 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