Add an autocomplete control to a view in an Access app

In Access web apps, an autocomplete controls shows choices as someone types to help them find the correct values. Picking the correct value from a long list of related items can be challenging but autocomplete controls can help with this task. For example, with this autocomplete control for shipping zones, if you type “m” you see four choices.

Partial matches appear as you type in an autocomplete box

If you add “e” to the “m” to form “me”, the list is narrowed down to Mexico only. And if you type "mo", all the choices disappear from the box because there's no match.

Note: Autocomplete controls are available only to Access web apps and not in Access desktop databases.

Add an autocomplete control to a view

To add an autocomplete control, you edit the view in Access and add an autocomplete control from the Controls gallery.

  1. Start Access, and open the web app.

  2. Click the table caption name in the Table Selector in the left pane, then click the view in the View Selector.

    In this example, Tasks is the table, and List is its view you want to add the autocomplete control to.

    Tasks table and List view in App design

  3. Click Edit in the middle of the screen to open the view in design mode.

  4. Under View, click Design > AutoComplete Control.

    Autocomplete control

  5. Move the new autocomplete control to the position you want.

  6. Optionally, add a label control by clicking the label button in the Controls gallery, and move the label next to the autocomplete control. Enter a caption that helps explain the use for the autocomplete control.

  7. Click the autocomplete control you added previously on the design grid, and then click the Data icon next to it to bring up its property options. This is where you'll hook the control up to its data source.

    Property box for a new autocomplete box control

  8. To "bind" the autocomplete control to a field (so the selected value is stored in that field), click Control Source, and select the field you want to store the value in.

  9. Click Row Source, and select the table or query that contains the values you want to appear as a user types in the autocomplete control. After you select a table or query here, Access displays additional property options.

  10. In the Bound Field box, select the field that contains the values you want to store from the list. The bound field is the value Access stores in the control source field you defined previously. In some cases this will be the ID value depending upon how you designed your tables and lookup fields. In the Primary Display Field box, select the field that contains the values you want to display from the related table or query. These are the values users will see when using this control in their browser.

    All available properties in property box

  11. Click Save on the Quick Access Toolbar to save your view changes.

Using an autocomplete control in your browser

As you enter text in the autocomplete control, you'll see that...

  • The more characters you type, the more the list is narrowed down.

  • The search is not case-sensitive; upper and lower-case letters are considered the same.

  • If there are more than 8 matches, a message appears at the bottom of the list suggesting you do a more specific search – in this case, keep typing more characters.

Set additional options for the autocomplete control

  • In the Default Value box, you can enter a value to be used as the default when a new record is created. If you are using an ID value as the bound field, you'll need to use an appropriate ID value from the related table.

  • In the Popup View box, you can choose a view that "pops up" in a new window if you click the value shown in the box (except in Datasheet view). When you add a view name as a popup, the display options are formatted like a hyperlink in your browser to show that it's clickable.

For example, clicking someone's name in the List view could show a list of all the details for that person – it's just like choosing that person's record from the List view. If the view also contains related items, those rows also appear in the popup window.

  • In the Secondary Display Field box, you can choose a "secondary" field to appear below each item – for example, suppose an employee's record has a field for their job title – you could choose the Job Title field as the secondary display field.

Here's an example that shows a secondary display field. Amy Strande's job title, "Managing Editor," is pulled from the Job Title field in Amy's record and is shown under her name. The secondary display field is available only in an autocomplete box while choosing values.

An autocomplete box search result with a secondary display field

  • On the Formatting properties, use the Hint box to enter descriptive text to help users understand how to use the autocomplete control. The default text is "Find..." but you can change that to something more suited to your needs such as "Enter an employee name."

An alternative to an autocomplete control is a combo box, which lets people click to see a dropdown list of choices, such as country/region names. To learn more about combo boxes, read adding a combo box to a view in an Access app.

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!