Link to home
Start Free TrialLog in
Avatar of NDawg
NDawg

asked on

How do I create a "Type to Query" form in Access?

I have a database with a large number of contacts.  I would like to create a form where I could easily narrow down my results by typing.  

Example:  

My form has 2 text fields.  fld_fname and fld_lname.  There is a list box showing all my contacts.  

I would like to narrow down the list by typing criteria in the fields.  Putting an A in fld_fname and T in fld_lname would narrow down the list to only show contacts with the initials A T etc...

Any thoughts?  

Oh yeah, I'm using Access 2003.  
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NDawg
NDawg

ASKER

Hey LSM, Thanks for the quick response.  Both work, but for my needs I'm going with the Chane event.  

Just did a quick test and the code works, but only allows for 1 character at a time.  As soon as I type the second letter it replaces the first letter.  

I've gotta sign off for now, but will continue to dig more tomorrow.  
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NDawg

ASKER

Ok. I think I've figure out what the problem is.  After filtering, the field is coming back with the entire contents selected.  That is why the second letter is replacing the first letter instead of being appended to it.  
the text box where you are typing the information must be UNBOUND for this to work.
Avatar of NDawg

ASKER

Both suggestions were a big help at getting me pointed in the right direction, but neither was a perfect solution.  I would give an A- if I could, but I can't.  

I'm old school access guy from way back.  As I got in to linux I eventually stopped spending much time with it.  I've got a project that calls for it and have found a few things have changed and that I've forgotten a few things.