dbTalk Databases Forums  

Convenient search feature for Access

comp.databases.ms-access comp.databases.ms-access


Discuss Convenient search feature for Access in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
klar
 
Posts: n/a

Default Convenient search feature for Access - 07-07-2010 , 03:52 AM






I would like to do a search feature similar to what Google has done.
When the user types in the initial letters of a keyword, Google will
automatically suggest some appropriate keywords. I have been
investigating on whether MSAccess can do this for searching records.
Say, user types in the first few letters of customer name. Then,
Access can be made smart enough to offer suggestions for the best
match. So far, my efforts have failed. I am not sure if my failed
efforts are due to my ignorance in Access or limitation of Access
itself. The closest thing I found is DoCmd.

Can the experts here advise? Thank you.

Reply With Quote
  #2  
Old   
Allen Browne
 
Posts: n/a

Default Re: Convenient search feature for Access - 07-07-2010 , 07:19 AM






If there's only a few keywords (thousands, not tens of thousands), you could
use a combo.

Otherwise you can use the Change event of the unbound text box where users
enter the search word. Do nothing until you have (say) 3 characters to
match. Then examine the Text property of the search box (Value is not
updated yet), save the Len(.Text), assign the Value, and set SelStart and
SelLength so that the remaining characters get overtyped as the user
continues.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"klar" <klarbuf (AT) gmail (DOT) com> wrote

Quote:
I would like to do a search feature similar to what Google has done.
When the user types in the initial letters of a keyword, Google will
automatically suggest some appropriate keywords. I have been
investigating on whether MSAccess can do this for searching records.
Say, user types in the first few letters of customer name. Then,
Access can be made smart enough to offer suggestions for the best
match. So far, my efforts have failed. I am not sure if my failed
efforts are due to my ignorance in Access or limitation of Access
itself. The closest thing I found is DoCmd.

Can the experts here advise? Thank you.

Reply With Quote
  #3  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: Convenient search feature for Access - 07-08-2010 , 01:11 AM



The feature you ask for has been built into access for at least 15 or more
years (even before Google existed).

Just drop a combo box onto your form and ensure that the wizards are
enabled. If you choose the option to find a record based on.... Access will
create a combo box that when you type in a few characters, it will suggest
the close matches.

Albert K.

Reply With Quote
  #4  
Old   
klar
 
Posts: n/a

Default Re: Convenient search feature for Access - 07-08-2010 , 06:06 AM



On Jul 8, 1:11*pm, "Albert D. Kallal" <PleaseNOOOsPAMmkal... (AT) msn (DOT) com>
wrote:
Quote:
The feature you ask for has been built into access for at least 15 or more
years (even before Google existed).

Just drop a combo box onto your form and ensure that the wizards are
enabled. If you choose the option to find a record based on.... Access will
create a combo box that when you type in a few characters, it will suggest
the close matches.

Albert K.
Thank you for all your replies. THey are good news!

Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.