Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sample database demonstrating Find-as-you-type VBA class for combo box. 1

Status
Not open for further replies.

BenSacheri

Programmer
Oct 13, 2015
14
US
Continuation of this thread: thread702-1756368

The images shows what happens when you type "del" into the combo box. It is configured to search any part of the word in two columns.


2017-07-10_14-16-31_nzysbg.png



Only two lines of code need to be added to your form after the Class Module has been added to the project.

Code:
Private faytFindCompanyOrContact As New clsFindAsYouTypeCombo ' You must declare a class variable for each combo box.

Private Sub Form_Open(Cancel As Integer)

    ' Initialize the fayt combo box and link it to an existing combo box that already has a row source.
    faytFindCompanyOrContact.InitalizeFilterCombo cboFindCompanyOrContact, "CompanyName;ContactName", False, True

End Sub
 
 http://files.engineering.com/getfile.aspx?folder=fbb3a773-230d-44bf-a924-c27e36bcea88&file=FindAsYouType_Sample_20170710.zip
I wonder if the same could be done across three combo boxes. Definitely food for thought. Yes, I actually do have a use case for that, but it might be more complex than 2 straight forward lists. Hopefully I can find the time to take a look at your example in the near future.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top