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?
Can Microsoft Access autocomplete fields?
Asked Answered
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.
hi hans why my new text entered is not in my combo box dropdownlist but it saved in my database..only the text value was in my dropdownlist a values i entered first when i create my table –
Bivins
Do you
Requery
the combo after you add new values to the table? –
Leaper i did that but it doesn't work in access 2007.faculty form i have staffdesc combo box..this is my code on Form type on Events tab...Private Sub Form_Current() Me.StaffDesc.Requery End Sub –
Bivins
That sounds correct to me. I don't understand why it's not working. Perhaps you can upload a copy of your db to a file sharing site and give a link. –
Leaper
Hi hansUp..i deal with three table..like ITStaff,AccountsStaff and SoftwareStaff with their ID and Description entered..so i in my FacultyForm i have ITStaffID,ItstaffDesc,AccountsStaffDesc and SoftwareStaffDEsc all have combo box except ITStaffID..im not sure in Form event Oncurrent which one is do the Requery? –
Bivins
If you're uncertain,
Requery
all 4 combos. –
Leaper © 2022 - 2024 — McMap. All rights reserved.
SELECT DISTINCT YourField FROM YourTable ORDER BY YourField;
– Leaper