• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Help with Access VBA - Combo box Autocomplete

novasatori

Diamond Member
I am trying to implement a searching combo box with auto complete, but I am really new at VBA.

This is the code: http://www.tek-tips.com/faqs.cfm?fid=6295

I am confused as what all exactly to replace, I guess because I don't understand the SQL SELECT query that is being made.

My key field is SM_ID, I would like to search and sort the autocomplete based on LAST_NAME or FullName.

Table name is ServiceMembers. If someone can help me that'd be awesome.

Edit: Here is what I tried to replace it with, but I get a prompt to "Enter Parameter Value - Name:"
Code:
    strSQL = "SELECT SM_ID,LAST_NAME,FullName FROM ServiceMembers Where " & _
    strFind & " ORDER BY FullName;"
Code:
    strSQL = "SELECT SM_ID,LAST_NAME,FullName FROM ServiceMembers ORDER BY FullName; "
    Me.Combo0.RowSource = strSQL
 
Last edited:
Well I think I fixed this myself finally. I didn't realize when I changed tName.Name I needed to change Name up further in the code.
 
Back
Top