Solved

opposite of .dropdown

Posted on 2007-11-18
6
555 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 119

Accepted Solution

by:
Rey Obrero 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 119

Assisted Solution

by:Rey Obrero
Rey Obrero 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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 119

Assisted Solution

by:Rey Obrero
Rey Obrero 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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now