Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

opposite of .dropdown

Posted on 2007-11-18
6
Medium Priority
?
742 Views
Last Modified: 2008-02-01
hello,

how to close a combobox with code?

thanks!
0
Comment
Question by:Moother
[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
  • 3
  • 2
6 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 1200 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 1200 total points
ID: 20307618
to clear a combo selection
me.comboname=""
0
 
LVL 10

Assisted Solution

by:LennyGray
LennyGray earned 800 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
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 1200 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 800 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

636 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