?
Solved

opposite of .dropdown

Posted on 2007-11-18
6
Medium Priority
?
764 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 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

809 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