473,902 Members | 5,149 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combobox Search and Select

6 New Member
See the attached ms access file.
I have one combobox I want to search and select a keyword in it. usually combobox give u facility of one keyword which start with. for example I want to see the word "Water" if I type "Water" in combobox it give all the records which have word "Water" anywhere start, between ot end. and I need to select in the searched item record.

how can I do it plz help.
Nov 21 '12
20 12564
6 New Member
actually its "need to have" its a must have requirement
to use one combo box and in that combobox only those records come which have same keyword which you typed in compbobox
Nov 22 '12 #11
2,322 Recognized Expert Moderator Top Contributor
Just to be 100% clear it is not possible. The combobox just doesn't function that way.

You will need to look at other ways to achieve it. You could use a textbox with a listbox being filtered as you type in the combobox. Another option could be a popup form with a textbox for typing the text and a means of displaying possible matches, with another means of selecting the match.
Nov 22 '12 #12
5,501 Recognized Expert Moderator Expert
You didn't really answer the question I asked.
Please re-read it.

So let me get this straight....

You have a table say as follows:
Name: tbl_listforcbo[listforcbo_pk] - autonumber; [listforcbo_name] - text(50)
(and yet more entries....)

This feeds your combo box control such as:
Name: cbo_listofnames
Record source:
FROM tbl_listforcbo

Number of columns: 2
Bound column: 1
Column Width: 0,1

So now when you open your form named say "frm_exampl e"
frm_example.cbo _listofnames appears first as an empty text box with a drop-down arrow button - Yes?
What other controls are on this form?
Is frm_example.cbo _listofnames acting as a filter for the details section showing records from another table?

From what little, information you've given and using the example I've given so far:
Now if the user clicks on the drop down button you see the entire list: [alpha], [ba], [be], [beet], [beta], etc...

If the user types in "B" in the text box and autoexpand is set to yes then "ba" shows up, if the user types "be" then nothing else shows up, if the user types "bet" then beta shows up... in each case if the user clicks on the drop down list, the user will see the entire list; however, the selection will be on the first item in list that contains the letters as typed in the order typed.

So good so far... and fairly much as you've described in #6

Instead of this behavior... what you appear to want is that when the user types in "be" and then clicks on the drip down button you want to see only:[be], [beet], [beta], [CitemwithBE], [DitemBEwith] in the list box portion of the combo box?

(BTW: this would be as I asked you in
Which of the following do you want:
- Do you want a combobox where in the available entries in the dropdown portion of the combobox change/filter as the user types the entry.
This actually sounds like a homework problem in an advanced design course and is something along the lines that Google does...

With that in mind I am going to ask you to:
Please post the code you've already tried.
Once copied and pasted, please format it using the <CODE/> button in the toolbar
Nov 22 '12 #13
32,584 Recognized Expert Moderator MVP
I'm guessing here, because frankly there is so little clear sense in this whole thread, but I think the OP wants a ComboBox control to work, not as it does, but to filter as you type such that only records that match what has been typed anywhere in the entry are included in the list.

This is clearly not something a ComboBox, or any other provided control, does naturally, or can easily be engineered to do. After all, a ComboBox doesn't even filter by what's typed at all, but only selects entries according to the matching of the first characters as entered.
Nov 22 '12 #14
5,501 Recognized Expert Moderator Expert
Oh Master NeoPa, forgive this Padwan-learner; however, as you've said, and as Master TheSmileyCoder, is what I am attempting to elicit from this Youngling - perhaps I do not clearly speak its language?

I suspect that yet some other Master has assigned this task to this Youngling as a punishment and I do not wish to interfere with such an assignment! And yet it is a cruel assignment so merely letting it walk off the cliff is also not desirable.

Now if the Youngling will post its code in a properly formatted code-block and answer the questions as ask perhaps we can instruct, clarify, and correct its work?
Nov 22 '12 #15
32,584 Recognized Expert Moderator MVP
And yet, if this young OP is walking towards the cliff edge and is ignoring the cries of warning from all around him, could it not be considered his responsibility only that he dashes his body on the rocks below?

With a great heart is necessary the wisdom to appreciate that theirs is not the responsibility for all the ills of the world, but only those that are put in its path to give it the opportunity of expressing itself. Be assured there will always be enough of those ;-)
Nov 22 '12 #16
6 New Member
by all of your answers i came to know that combo box can not do thies functionality of filtered text only. although i put following code
Expand|Select|Wrap|Line Numbers
  1. Private Sub listforcbo_name_Change()
  3. Dim sql As String
  4. sql = "SELECT * FROM tbl_listforcbo " & _
  5.  "WHERE listforcbo_name Like '*" & strString & "*'"
  6. End Sub
but it didn't work
anyways please give me ideawhat i can do for this problem
what should i use instead of combobox
i want to give facility to the user that he can choose the particular record into combobox, listbox, textbox, wat he entered and choose according to it own choice
let say
i give you example of customer name
user want to choose all custmoers which have name "Mathew" either first name, middle name, or last name. he can choose any customer name and the value should be save there where he type the keyword.
hope you people will unerstnad my problem
Nov 22 '12 #17
6 New Member
what if i run a query in combobox click event the query run and i choose particuar field of my choice and after choosing the value from query it come to combobox
Nov 22 '12 #18
12,516 Recognized Expert Moderator MVP
Please use code tags when posting code.

It most likely didn't work because you didn't define strString.
Nov 22 '12 #19
32,584 Recognized Expert Moderator MVP
If people that try to help you ask you for information then ignoring those requests is not a good way to go about ensuring you get help. Everyone can see that you have ignored half of the responses. Do you imagine people are stupid? Why waste time trying to help someone who cannot even be bothered to reply to those people who do try to help.

You're heading for the cliff edge and we're trying to shout warnings. If you walk over the edge though, only you are responsible.
Nov 22 '12 #20

Sign in to post your reply or Sign up for a free account.

Similar topics

by: SAN CAZIANO | last post by:
check required in a select how can i control if a combobox (a select) is not null (index is -1) or if index is 0 if the first element is for example a null value or simply a description of the field . I try to use this if (combobox.SelectedIndex==0 || combobox.SelectedIndex==-1)
by: Jan | last post by:
I am having problems trying to print a report based on a form. This is a search form only, no data input. There is a query that the form looks at, but then there are numerous comboxes that you can pick information from either one or many and press a search button. See code below for the "Case Select" that was used to make up the comboboxes. Not a filtered list. My problem is that when I try to print, it prints all records before the...
by: Cillies | last post by:
Hi all, I was wondering if anyone knows how to manipulate combo boxes. What I want to do is as follows: - Two combo boxes 1st box contains = Interested, Not Interested 2nd box contains = Renewal, Upgrade, new
by: Strahimir Antoljak | last post by:
Has anyone experienced problems with a combo box SelectIndex property? Is there a limit to the number of Items for a combo box? Namely, when I set programmatically ComboBox.SelectIndex property with 2000 Items listed in the ComboBox, SelectIndex property accepts assigned value. However, when I try to use SelectIndex
by: jojowebdev | last post by:
I have been TRYING for a few days to get a *working* search of a select list (about 800 options in list). I have not found one that works for IE6. Here is what I *last* tried. I would appreciate any help to get me through this. Thank you. function searchList(textInput) { var carrier_list = document.carrRequestForm.carrierList; for (i = 0; i < carrier_list.length; i++) {
by: Eric85 | last post by:
I have a question on how combo serach box work... i have a table call StudentInfo my Primary key is set to auto number (which is thier membership number) i want to be able to scan the number(thier number is the autonumber)into the combo box and have thier personal information(i have all thier information stored) show on the Access Form Thanks sorry about i'm quite new to access trying to design a DB for my club
by: Pascal Hagedorn | last post by:
Hello Alltogether, following problem is bugging me :) I am havin a Combobox where i can browse and select my articles. So far so good! Over the time my table "article" growed and now it is not very conveniant to search for articles, the name you dont know exactly Now i would like to realise the same Combobox with a Select statement over the same table "article" as follows:
by: Peter Herath | last post by:
i want to display results in a combo box when i select a value from another combo box. for an example i hav two tables called Project and Indicator... i want to select a project name and when i select a proj name then the second combo box box must be filled with related indicator names for that project as a result. help me plssssss.s..s....
by: =?Utf-8?B?bWVtZWFk?= | last post by:
I have a combobox displaying the full name of a customer (e.g. John Smith) and would like to go to the LAST name whenever a user presses a key while on this combobox. I have looked at the AutoCompleteMode and AutoCompleteSource properties of the combobox, but they only key off of the FIRST name (e.g. pressing "B" will select "Bob Smith", not "Sam Barnes"). Even FindString and FindStringExact only appear to key off of the prefix. This...
by: bullfrog83 | last post by:
I have a form where a user can search for a person either by their id or by their name. To faciliate a search by id I have an unbound textbox (txtPeopleId) and for a search by name I have an unbound combobox (cboSelectName). If a user types in an id, I want the combobox to populate with the person's name. So, in the AfterUpdate event of txtPeopleId I have the following: Me.cboSelectName.RowSource = "SELECT * FROM vwStudentNames WHERE...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.