This is a continuation of an old thread I mistakenly added my question to. I have been advised to start again as the old thread was marked "closed" Rookie mistake.
https://www.accessforums.net/showthr...318#post458318
Take 2!
Here's what I posted a few hours ago.
Be kind please. First post. (Well, third now I guess.)
I'm a rank amateur beginner but I'm slowly learning and enjoying the process. I've been at it for about a month.
I realise this is a very old thread but I've been trying to get this same VBA working and am still getting the same result as aonsu209 was getting. (In the original thread)
Namely, the list part of the combo box goes blank.
Judging from the spaces being shown as I enter characters and the list contracts and knowing what is in the relevant table I'd say the search itself is working fine.
the Row Source for my combo box isCode:Private Sub SearchCombo_Change()Dim strSQL As String If Len(Me.SearchCombo.Text) > 0 Then strSQL = "SELECT CustomerT.Search FROM CustomerT WHERE (((CustomerT.Search) Like '*" & Me.SearchCombo.Text & "*')) ORDER BY CustomerT.Search;" Else strSQL = "SELECT CustomerT.Search FROM CustomerT ORDER BY CustomerT.Search;" 'This is the default row source of combo box End If Me.SearchCombo.RowSource = strSQL Me.SearchCombo.Dropdown End Sub
The ComboBox name is "SearchCombo"Code:SELECT CustomerT.[ClientID], CustomerT.[Search] FROM CustomerT;
Table name is CustomerT
I've used a calculated field to combine the columns "FirstName", "PartnersName" & "LastName" into one field called "Search" This is the field that populates the ComboBox
Can anyone please help?
Cheers
Jim