Connecting Tech Pros Worldwide Forums | Help | Site Map

MS Access autocomplete/autofill text box

Newbie
 
Join Date: Sep 2008
Posts: 10
#1: Aug 17 '09
I have searched and searched and cannot seem to find an answer that fits my needs. Hopefully you can help.

I have a database that stores names,addresses, etc. I am trying to get it to where I start typing the last name it will 'suggest' names that are already in the table. ex. If the last name is "Johnson", When I start typing "Jo" it will automatically complete as i type.

Any Idea's?

Thank you
Shaft11
Expert
 
Join Date: Jul 2009
Location: KY
Posts: 250
#2: Aug 17 '09

re: MS Access autocomplete/autofill text box


I would make the fields, you wish to auto complete, combo boxes where the record source is Last name, First Name...etc. When using a combo box, the results narrow as you type in the box. Try it and let me know if this works for your needs.

-AJ
ADezii's Avatar
Expert
 
Join Date: Apr 2006
Location: Philadelphia
Posts: 5,214
#3: Aug 19 '09

re: MS Access autocomplete/autofill text box


Quote:

Originally Posted by Shaft11 View Post

I have searched and searched and cannot seem to find an answer that fits my needs. Hopefully you can help.

I have a database that stores names,addresses, etc. I am trying to get it to where I start typing the last name it will 'suggest' names that are already in the table. ex. If the last name is "Johnson", When I start typing "Jo" it will automatically complete as i type.

Any Idea's?

Thank you
Shaft11

What ajalwaysus is referring to is the AutoExpand Property of a Combo Box. You can use the AutoExpand property to specify whether Microsoft Access automatically fills the text box portion of a combo box with a value from the combo box list that matches the characters you enter as you type in the combo box. This lets you quickly enter an existing value in a combo box without displaying the list box portion of the combo box. You can also create a Text Box/List Box combination like the one in Windows Help. As you type in the Text portion of the Text Box, the List Box will scroll to whatever has been typed so far. It is a very handy feature but the coding is slightly complex.
Newbie
 
Join Date: Sep 2008
Posts: 10
#4: 4 Weeks Ago

re: MS Access autocomplete/autofill text box


Thanks,

It works, but if I add a name that is not in the list I get the 'Not in the list' Error

Other than that it works.

(Sorry it took me so long to reply, I had to buy a new computer due to a STUPID virus)
nico5038's Avatar
Moderator
 
Join Date: Nov 2006
Location: The Netherlands
Posts: 2,232
#5: 4 Weeks Ago

re: MS Access autocomplete/autofill text box


Might be helpfull to check this page:
http://www.j-walk.com/ss/excel/tips/tip77.htm
when you want to match also sound-like names.

Nic;o)
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,715
#6: 4 Weeks Ago

re: MS Access autocomplete/autofill text box


Quote:

Originally Posted by Shaft11 View Post

It works, but if I add a name that is not in the list I get the 'Not in the list' Error

Other than that it works.

Set the .LimitToList property to No, and call a .Requery after updating the control.
Reply