问题
I have a ComboBox that has a row source of
SELECT tblTCOAppCodes.id,
tblTCOAppCodes.tcoAppCode & " : " & tblTCOAppCodes.description AS Description
FROM tblTCOAppCodes
ORDER BY tblTCOAppCodes.tcoAppCode;
Normally a combo-box allows auto-complete but in this case it does not and I'm assuming it's because I'm concatenating the values from 2 columns.
Screenshot of how the column looks.
回答1:
It does work here (Access 2010, but that shouldn't matter).
I created a table with your field names and sample data, and the combo box with your row source. I added a Appcode of 9900 for easier testing.
I type 9
, and the item is selected. Or 8302
to select the 3rd item.
You aren't expecting to be able to type e.g. Ent
to select the 8301
item, are you? This isn't possible, because the column string starts with 8301.
If you want that, the combo box must have 3 columns, with description
being the second one = the first visible one. tcoAppCode
would have to be the last column.
来源:https://stackoverflow.com/questions/36499766/ms-access-auto-complete-not-working-on-combobox