by Juanito Dado Jr (4 Submissions)
Category: Databases/Data Access/DAO/ADO
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (4 Votes)
Autocomplete textbox and listbox in one. Gets data from a recordset then populate the listbox. Autofills the textbox then synchronously highlights the listbox. Great autocomplete please vote for ME.
Side Effects
NOTE: Applicable to 32k of entries in the database. Anything larger than that, it will crash because listbox can't hold more than 32k of data. Cheers!!!
API DeclarationsOption Explicit
'API call to listbox
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _
ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByRef lParam As Any _
) As Long
Const LB_FINDSTRING = &H18F