|
-
Mar 21st, 2011, 08:13 PM
#1
Thread Starter
Lively Member
Searching MS Access Database using combobox ? [google way]
Im new to db access and Im not quite familiar to searching. How can I search all my field and will show the nearest match for the keyword and will be shown under the combobox the nearest results that it can find in my db. Like searching search engines like Google that you can find their suggestions under the combobox ?
Last edited by networkmancer; Mar 23rd, 2011 at 11:01 AM.
 Requiscat En Pace
-
Mar 21st, 2011, 08:36 PM
#2
Re: Searching Keywords for MS ACCESS
What's your definition of "nearest"?
-
Mar 21st, 2011, 08:53 PM
#3
Thread Starter
Lively Member
Re: Searching Keywords for MS ACCESS
hmm. Closest match .
When you try searching in a search engine then it will prompt in a combobox the results that match the one that your typing. I want to have when Ill try to put Alexan and I have alexander on my first name in my database then it will show Alexander in list of combobox.
 Requiscat En Pace
-
Mar 21st, 2011, 09:04 PM
#4
Re: Searching Keywords for MS ACCESS
That's not a definition. You can't use some wishy-washy description like that because you have to write code to implement it. You have to have an exact, implementable definition. Computers don't have intuition like human beings do. Computers follow hard and fast rules, so you have to decide what those rules are.
-
Mar 21st, 2011, 09:37 PM
#5
Thread Starter
Lively Member
Re: Searching Keywords for MS ACCESS
Whats with that? I was just describing what It supposed to look like. I gave already examples.
 Requiscat En Pace
-
Mar 21st, 2011, 09:59 PM
#6
Re: Searching Keywords for MS ACCESS
An example is not a definition. It's an example. Do you mean that you want to get all the values that start with the value you entered? All the values that contain the value you entered? Something else? Case-sensitive or case-insensitive? Also, what would make one such match "nearer" than another?
-
Mar 21st, 2011, 10:12 PM
#7
Re: Searching Keywords for MS ACCESS
Also, regardless of how you get the data, how exactly do you want it to be used? It sounds like you probably want to use the auto-complete functionality built into the TextBox or ComboBox class, but it's not clear which. You say ComboBox but you may be confusing the auto-complete list with the drop-down list, which are different. If you can provide a full and clear description then we can provide the most informed advice, rather than assume and guess and maybe get right or maybe not.
-
Mar 21st, 2011, 10:43 PM
#8
Re: Searching Keywords for MS ACCESS
-
Mar 21st, 2011, 11:50 PM
#9
Re: Searching Keywords for MS ACCESS
 Originally Posted by CVMichael
That's useful for full-text searching...
It sounds to me like the OP wants the "Suggest" type of auto-complete which is built in to TextBoxes and ComboBoxes.
A custom AutoCompleteSource can be specified if the items aren't already in the combo box's data provider.
-
Mar 22nd, 2011, 05:49 AM
#10
Thread Starter
Lively Member
Re: Searching Keywords for MS ACCESS
Thanks for the reply guys. I do not know what to use exactly but I want like the Google way , it is not really necessary to auto complete as long as it will show the available matches in my access database.
Hope this simple layout explains
 Requiscat En Pace
-
Mar 22nd, 2011, 08:11 PM
#11
Thread Starter
Lively Member
Re: Searching Keywords for MS ACCESS
Anyone? I cant search this forum because it will just give me this error..
Code:
Your submission could not be processed because the token has expired.
Please push the back button and reload the previous window.
 Requiscat En Pace
-
Mar 22nd, 2011, 08:24 PM
#12
Re: Searching Keywords for MS ACCESS
Hi networkmancer,
You just have to search for every keystroke, and populate a drop down with the result.
Make a query something like:
SELECT TOP 10 Name
FROM your_table
WHERE Name LIKE string_typed + '*'
And put the result in the drop down
-
Mar 22nd, 2011, 09:45 PM
#13
Thread Starter
Lively Member
Re: Searching Keywords for MS ACCESS
@CVMichael
Thanks for your reply but I really dont know the exact codes to be use and procedures. Can you guide me?
 Requiscat En Pace
-
Mar 22nd, 2011, 10:26 PM
#14
New Member
Re: Searching Keywords for MS ACCESS
just like CVMichael said,
SELECT Name[ the row of the table which you want it to search for, for my case i want it to search for the Name row ]
FROM Table 1 [Your table name]
WHERE Name LIKE @value + N'%' [ the code for filtering your row (LIKE @value + N'%') ]
NOTE : Use the "Add Query" function provided in the DataGridview task of your table
Good Luck
-
Mar 23rd, 2011, 10:59 AM
#15
Thread Starter
Lively Member
Re: Searching Keywords for MS ACCESS
Can you guys guide me step by step? sorry for the disturbance really. I cannot really follow you guys because I just go with the database wizard. The deadline is fast approaching that is why I cannot learn manual coding of db this time because of the deadline.
 Requiscat En Pace
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|