If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > combobox auto dropdown

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-09-10, 08:56
Pete Townsend Pete Townsend is offline
Registered User
 
Join Date: Aug 2006
Posts: 78
combobox auto dropdown

In Access 2003, Is there anyway of having a combo box automatically drop down the underlying list, without clicking the dropdown button, as soon as the user starts typing in the box? (e.g. similar to the google search box).

I presume this would have to be done with an event procedure triggered by something like "on dirty". [ If that can be done, then there's the ancillary question of how to delete the dropdown button, since it would no longer be needed ]

Pete
__________________
PGT
Reply With Quote
  #2 (permalink)  
Old 07-09-10, 11:19
Missinglinq Missinglinq is offline
Registered User
 
Join Date: Jun 2005
Location: Richmond, Virginia USA
Posts: 1,702
Normally you'd just drop it down when it gets focus:
Code:
Private Sub ComboBoxName_GotFocus()
  Me.ComboBoxName.Dropdown
End Sub
__________________
Hope this helps!

The Devil's in the Details!!

All posts/responses based on Access 2000/2003
Reply With Quote
  #3 (permalink)  
Old 07-09-10, 12:54
HiTechCoach HiTechCoach is offline
Registered User
 
Join Date: May 2010
Posts: 600
Pete,


Missinglinq's code will drop the the list. You also ask about makng it close. When the control has lost the focus, it will automatically close the drop down list.

TIP: F4 toggles the drop down list when the control has the focus.
__________________
Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
Microsoft MVP - Access Expert
BPM/Accounting Systems/Inventory Control/CRM
Programming: Nine different ways to do it right, a thousand ways to do it wrong.
Binary--it's as easy as 1-10-11
Reply With Quote
  #4 (permalink)  
Old 07-09-10, 13:38
AJSmith AJSmith is offline
Registered User
 
Join Date: Jul 2010
Posts: 6
You could try a text box on top of a list box, instead of using a combo box. Set the list box to requery for every textbox.onchange which would populate your list as you type.
Reply With Quote
  #5 (permalink)  
Old 07-10-10, 10:11
Pete Townsend Pete Townsend is offline
Registered User
 
Join Date: Aug 2006
Posts: 78
Thanks to all. Missinglinq's one-liner was what I was looking for. I'd not found the Dropdown property when I was originally looking.
Pete
__________________
PGT
Reply With Quote
Reply

Tags
combo box, dropdown

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On