A Microsoft Office (Excel, Word) forum. OfficeFrustration

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   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

making a combo box open when the first letter is typed



 
 
Thread Tools Display Modes
  #1  
Old July 11th, 2004, 08:40 PM
Paul James
external usenet poster
 
Posts: n/a
Default making a combo box open when the first letter is typed

Is there a way to get a combo box to pop open as soon as the user types the
first letter from the keyboard?

My reason for wanting this is that the Row Source for this combo box has
almost 2,000 records, and while the values in the (0" width, VendorID) bound
control are unique, the values in the column the user is seeing, and typing,
aren't. The reason for this is that the user is typing values into the 2"
width Vendor column, but some of these Vendors appear in more than one
record, when a Vendor has more than one address. So if the user doesn't at
least get a visual cue that there are more than one of these Vendors, along
with a display of their addresses in the adjacent column, they might select
the first Vendor that the auto complete feature of the combo box leads them
to. But that will not necessarily be the one they want. Hence, my thinking
the best way to deal with this is to have the combo box pop open as soon as
they type the first letter, so they can at least see the other record(s) for
that vendor right below the currently-highlighted rows.

If there's a better approach to handling this, please tell me. Otherwise,
how can I get the combo box pop open as soon as the first letter is typed?

Thanks in advance to all you kind folks out there who answer these
questions.

Paul


  #2  
Old July 11th, 2004, 08:56 PM
Ken Snell
external usenet poster
 
Posts: n/a
Default making a combo box open when the first letter is typed

You could use the OnChange event of the combo box to drop down the combo
box's list:

Private Sub cboBoxName_Change()
Me.cboBoxName.DropDown
End Sub

Note that this code will run each time a letter is typed. Perhaps it would
be better to dropdown the list as soon as the combo box gets the focus:

Private Sub cboBoxName_GotFocus()
Me.cboBoxName.DropDown
End Sub


--

Ken Snell
MS ACCESS MVP

"Paul James" wrote in message
...
Is there a way to get a combo box to pop open as soon as the user types

the
first letter from the keyboard?

My reason for wanting this is that the Row Source for this combo box has
almost 2,000 records, and while the values in the (0" width, VendorID)

bound
control are unique, the values in the column the user is seeing, and

typing,
aren't. The reason for this is that the user is typing values into the 2"
width Vendor column, but some of these Vendors appear in more than one
record, when a Vendor has more than one address. So if the user doesn't

at
least get a visual cue that there are more than one of these Vendors,

along
with a display of their addresses in the adjacent column, they might

select
the first Vendor that the auto complete feature of the combo box leads

them
to. But that will not necessarily be the one they want. Hence, my

thinking
the best way to deal with this is to have the combo box pop open as soon

as
they type the first letter, so they can at least see the other record(s)

for
that vendor right below the currently-highlighted rows.

If there's a better approach to handling this, please tell me. Otherwise,
how can I get the combo box pop open as soon as the first letter is typed?

Thanks in advance to all you kind folks out there who answer these
questions.

Paul




  #3  
Old July 12th, 2004, 01:18 AM
Paul James
external usenet poster
 
Posts: n/a
Default making a combo box open when the first letter is typed

Works great. Thanks, Ken.

Actually, I'm probably going to use the Change event since the overhead is
only a few nanoseconds. Having the box drop down when you merely tab into
it can be visually obtrusive.

Paul


 




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Design questions Bruce Database Design 15 June 19th, 2004 12:12 AM
Requery Combobox MJ Running & Setting Up Queries 7 May 25th, 2004 11:01 AM
Excel 97 Combo Box Questions Romy Worksheet Functions 2 May 17th, 2004 10:05 PM
Making a workbook always open on the same worksheet? Frank Kabel Worksheet Functions 2 April 21st, 2004 03:29 PM
Making a button to open a work book Darrell Worksheet Functions 2 February 3rd, 2004 01:26 PM


All times are GMT +1. The time now is 10:28 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.