Kioskea
Recherche
Ask a question »

Access: AutoComplete a field

March 2015


Access: AutoComplete a field




Issue


I am a novice in Access, I use the 2007 version.

I am creating a database for my company, which contains several tables, including one that interests us: CUSTOMER
It contains several fields, including classic name and first name for example.
It will be filled by the user, with the intermediation of a form.

I would hope that when the user types the first letter for example the name, or the 3 1st, the name of the client starts automatically in the box (of course if it already exists in the table)

How to do this please, I searched in vain on the net, apparently it is not possible with Access 2007!?

Solution


If you use a combo, you get the function you want using this syntax event, called on focus.

Private Sub <field> _GotFocus ()

If IsNull (Me! <field>) Then
Me! [<field>]. Dropdown
End If

End Sub

This syntax filter dynamically typed characters in the "field" that collects the desired record via the dropdown list. This device does
no slowdown.

I would add that it works in Access 2000 at home. So to test
in 2007.

Note


Solved by Jean_Jacques
For unlimited offline reading, you can download this article for free in PDF format:
Access-autocomplete-a-field.pdf

See also

In the same category

Published by aakai1056.
This document entitled « Access: AutoComplete a field » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.