Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Microsoft Access autocomplete fields?

I'm using Microsoft Access 2007. When I start typing a new record,is there a way to get access to suggest things I've previously typed, to save me time typing the whole word in? For example when I start typing S, it might start suggesting words that I've already typed beginning with S, then if I type ST it might suggest STATION and I can just press enter to insert that word?

like image 547
Tukai Nancy Avatar asked Mar 06 '13 21:03

Tukai Nancy


People also ask

How do you autofill fields in Access?

Click Edit in the middle of the screen to open the view in design mode. Under View, click Design > AutoComplete Control. Move the new autocomplete control to the position you want. Optionally, add a label control by clicking the label button in the Controls gallery, and move the label next to the autocomplete control.

How do you autofill numbers in Access?

It's very easy to set a field to auto numbering. When you are in the design view for your Microsoft Access database, just choose a field name, and then set its data type to be 'AutoNumber'.

How does DLookup work in Access?

In Access desktop databases you can use the DLookup function to get the value of a particular field from a specified set of records (a domain). Use the DLookup function in a Visual Basic for Applications (VBA) module, a macro, a query expression, or a calculated control on a form or report.


1 Answers

Your question includes a tag for combobox; seems to me that could be the most inexpensive solution.

Make the combo row source a query:

SELECT DISTINCT YourField
FROM YourTable
ORDER BY YourField;

With the combo's "limit to list" property set to "No", the user can add a value which doesn't exist in the previously stored values.

Alternatively, set that property to "Yes" and write VBA code for the combo's "On Not in list" event.

Either way, you should have an index on YourField. You can .Requery the combo's row source from the form's On Current event so that it "refreshes" to pick up the newest additions.

like image 127
HansUp Avatar answered Sep 21 '22 13:09

HansUp