Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / February 2006

Tip: Looking for answers? Try searching our database.

Autocomplete form field in MS Access Database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ghadley_00@yahoo.com - 06 Feb 2006 03:00 GMT
Hi,

I have an access database with forms. I was wondering if there was a
way to make a form field do an autocomplete action during data entry
based on values already in that field for other records? In other
words, if I were to enter the letter J into a field, an autocompletion
of the alphabetically first entry in the table for that field beginning
with J is filled in, and the list would get refined based on further
letters entered.

Any help any one could provide would be greatly appreciated.

Best wishes,

George Hadley
ghadley_00@yahoo.com
Allen Browne - 06 Feb 2006 03:48 GMT
Could use use a combo box on this field with properties:
   Control Source:    Field1
   RowSource:         SELECT DISTINCT Field1 FROM Table1 ORDER BY Field1;
   Limit To List:        No
where Field1 represents the name of the field in Table1.

If you want to do it with a text box, you would need to use its Change event
to open a recordset and get the first match (using the Like operator), and
set the Text property of the box. Then use SelStart and SelLength to select
the remaining characters so the user can continue typing.

Signature

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.

> I have an access database with forms. I was wondering if there was a
> way to make a form field do an autocomplete action during data entry
[quoted text clipped - 10 lines]
> George Hadley
> ghadley_00@yahoo.com
ghadley_00@yahoo.com - 06 Feb 2006 22:33 GMT
Exactly what I needed - worked like a charm - thanks!

-GH
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.