Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I close a combobox after using dropdown command 1

Status
Not open for further replies.

dawnd3

Instructor
Jul 1, 2001
1,153
0
0
US
Hi again,

I have I have a combobox that uses the activeform.dropdown command to automatically open when user enters the feild. However, there is also a NotInList event that triggers a message to add the item when new. When this message comes up the combobox list is covering the message and there is just a peice of it sticking out so that I can click yes and add my item. However, I don't think the user will like this feature :) Is there a way to tell the dropdown to close back up? This is in Access 2000. Thanks, your expert and novice Dawn

 
It's a trick !
cmb.Enabled = False
cmb.Enabled = True
Hope this helps if not let me know

Jn88
Jn88@att.net
 
Oops I meant to say that the command is
Activecontrol.dropdown
I put this in the onKeyPress event

So how do I apply your suggestion?
Activecontrol.dropdown = false ???

I already tried that and it didn't work. Am I doing the syntax correctly?

Thanks for your help.

Dawn
 
I said “it is a trick” there is actually no way of closing the combo box but by sating the combo box enabled property to false and then back to true it will close itself, I hope you get it. Hope this helps if not let me know

Jn88
Jn88@att.net
 
I am sorry if I am being an airhead here...but do I replace my code with your suggested code or do I add it. And what event should I place this code? Thanks again. Dawn
 
Send me your email address and I will sand you an example attachment Hope this helps if not let me know

Jn88
Jn88@att.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top