Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 26th, 2007, 08:07 AM
Authorized User
 
Join Date: Feb 2006
Location: jaipur, rajasthan, India.
Posts: 67
Thanks: 7
Thanked 0 Times in 0 Posts
Send a message via Yahoo to beetle_jaipur
Default How to apply filter to shrink combo box records

hi all,

i have a small problem about to apply filter in a combo box and requiry records.

i am using a combo box named InstituteName which contains names of all institutes (approx 60,000) from a master table "Institutes".

i have set combo box InstituteName auto expand property to YES.

problem : i want to shrink list automatically as i type text in the combo box

exa : if i start typing with J then only records which contains J, must be in that combo box rather than all records, then if i press next character A -> now it must contain only records containg JA and so on so if finally i type JAIPUR, it must contains only records which contains JAIPUR in it.
(JAIPUR could be anywhere in records, starting, middle, or anywhere in records)

i have no idea from where to start, and how to do it, if anyone can help i will be very thankful. i am still searching its solutions so all suggestions are welcome.

thanks for reading this problem and considering it

thanks once again

ashok sharma

Reply With Quote
  #2 (permalink)  
Old July 26th, 2007, 09:50 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You can do this with code, but I am not sure if you have enough events to dynamically shrink the combo box this way.

Also, it looks like your code will do this:

Type "J"
Search for all records with J anywhere in string.
Type "JA"
Search for all records with JA anywhere in string
Type "JAI"
Search for all records with JAI anywhere in string
etc

I would suggest giving the user a text box where they can type in "JAIPUR" and then have THAT return a combo box populated with all strings with "JAIPUR" in them.

Would that work for you?


mmcdonal
Reply With Quote
  #3 (permalink)  
Old July 27th, 2007, 09:12 AM
Authorized User
 
Join Date: Feb 2006
Location: jaipur, rajasthan, India.
Posts: 67
Thanks: 7
Thanked 0 Times in 0 Posts
Send a message via Yahoo to beetle_jaipur
Default

Hi

thanks for your reply and considering this problem.

if you can plz guide me just from where to start ( or what route to follow) am sure i can do it.

thanks once again

ashok sharma


Reply With Quote
  #4 (permalink)  
Old July 28th, 2007, 01:58 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Allen Browne has a neat solution to this problem in his list of tips. You will find it here: http://allenbrowne.com/ser-32.html

I hope you find it useful.
Hunter57


Quote:
quote:Originally posted by beetle_jaipur
 hi all,

i have a small problem about to apply filter in a combo box and requiry records.

i am using a combo box named InstituteName which contains names of all institutes (approx 60,000) from a master table "Institutes".

i have set combo box InstituteName auto expand property to YES.

problem : i want to shrink list automatically as i type text in the combo box

exa : if i start typing with J then only records which contains J, must be in that combo box rather than all records, then if i press next character A -> now it must contain only records containg JA and so on so if finally i type JAIPUR, it must contains only records which contains JAIPUR in it.
(JAIPUR could be anywhere in records, starting, middle, or anywhere in records)

i have no idea from where to start, and how to do it, if anyone can help i will be very thankful. i am still searching its solutions so all suggestions are welcome.

thanks for reading this problem and considering it

thanks once again

ashok sharma

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo box to display items from parent combo box Gini Visual Studio 2008 0 June 18th, 2008 12:30 AM
Filter records using a combo box tixe83 Access 2 August 3rd, 2006 12:43 PM
Input type=file apply a filter?? italiansensation ASP.NET 1.x and 2.0 Application Design 3 May 24th, 2006 04:06 AM
How could I correctly apply the filter ? Boris1974 Access 8 January 5th, 2005 03:29 AM
Combo box that links records from two tables... takawera Access VBA 1 October 14th, 2003 05:39 PM



All times are GMT -4. The time now is 01:08 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.