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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box: Only want selective records to show.

Status
Not open for further replies.

SALEEYOUNG

Programmer
Jan 19, 2005
8
US
I was working in another database and when I went to a certain field (combo box) and typed in the first three characters the box only pull up those records containing those characters. It was nice because the list was short and the selection was limited. Was wondering if anybody out there knows how to accomplish this action. Any help would be greatly appreciated. Thank you.
 
Take a look at the Change or KeyPress event procedure of this combo.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
As you type into combo boxes, if you have autofill turned on, all combo boxes do this. Make sure the AutoFill property of the combo box is set to Yes

-Patrick

Nine times out of ten, the simplest solution is the best one.
 
ptpaton, I don't think the access ComboBox object expose the AutoFill property, but AutoExpand (with a different behaviour than related by SALEEYOUNG).

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
It depends on how far you want to limit it. For example, some forms I use, I limit the display based on another field by using the row source expression builder to create a line of code like this

SELECT DISTINCTROW validProjects.ProjectID, validProjects.[Project Number], validProjects.Status FROM validProjects WHERE (((validProjects.Status)=1 Or (validProjects.Status)=4)) ORDER BY validProjects.[Project Number];

__________________________________
Remember that time when I took the box? - Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top