How to Auto Complete a form field (1 Viewer)

RichO

Registered Yoozer
Local time
Today, 02:58
Joined
Jan 14, 2004
Messages
1,036
I searched through the archives and the only post I could find with the same question as mine contained an outdated link in the response so I could not find any answers.

We have a form set up for a CD music library. Often times there are duplicate artist names to enter and I would like to have it auto-complete the field just like Excel does. A combo box would be out of the question because there are thousands of entries.

Does Access have any sort of built in function that can be activated for this or do you have to set up an event procedure, and is that even possible as far as tracking each character for matches as it is typed. To clarify...

If you type "BEA" it either would not display a match because the table contains more than one artist starting with those letters (BEATLES, BEACH BOYS), or it would lock on to the first match found which would be OK. Then you type a "T" to make it "BEAT" and it auto-completes the field with BEATLES.

I tried to run a query on the artist field using "Like" but I can't figure out how to get it to track the text I am typing because the field is not updated until enter is pressed.

Any ideas? Is this even possible?
 

Newman

Québécois
Local time
Today, 03:58
Joined
Aug 26, 2002
Messages
766
You could use the «KeyPress» event. I didn't figure out the code yet though. If no one comes with it before tomorrow, I'll give it a try.
Good luck!
 

neileg

AWF VIP
Local time
Today, 08:58
Joined
Dec 4, 2002
Messages
5,975
A combo box works fine with thousands of entries...
Excel will autocomplete with a list of thousands of entries.I don't see the difference.
 

RichO

Registered Yoozer
Local time
Today, 02:58
Joined
Jan 14, 2004
Messages
1,036
Sounds like that will work. I didn't realize that combo boxes have the auto complete feature. Previously I had only used the mouse for selecting records in a combo box.

Thanks
 

Gibbo_5150

Hit any user to continue.
Local time
Today, 17:58
Joined
Jul 18, 2006
Messages
5
How do I turn the autocomplete feature on?
 

ansentry

Access amateur
Local time
Today, 17:58
Joined
Jun 1, 2003
Messages
995
Gibbo_5150 said:
How do I turn the autocomplete feature on?

There is no need to "turn it on" it just works as default.

If you have say 500 names and you want Smith start typing and you will see the auto complete working.
 

Users who are viewing this thread

Top Bottom