S Shankar14 New member Local time Today, 06:28 Joined Apr 6, 2022 Messages 7 Apr 8, 2022 #1 Is it possible via VBA to select an item from a combobox drop down where the value is from an input text box? Using VBA option 'after update', Is it possible to redefine combobox row source if already bound ?
Is it possible via VBA to select an item from a combobox drop down where the value is from an input text box? Using VBA option 'after update', Is it possible to redefine combobox row source if already bound ?
GPGeorge George Hepworth Local time Yesterday, 22:28 Joined Nov 25, 2004 Messages 2,454 Apr 8, 2022 #2 "Is it possible via VBA to select an item from a combobox drop down where the value is from an input text box?" Yes. "Using VBA option 'after update', Is it possible to redefine combobox row source if already bound ?" Yes. Now, if you want some examples of HOW to do those things.... Really simplistic approaches: Private Sub txtInPutBox_AfterUpdate() Me.ComboBox = txtInPutBox End Sub Unfortunately, "Using VBA option 'after update'..." isn't enough to go on. "After update" of "what" matters here.
"Is it possible via VBA to select an item from a combobox drop down where the value is from an input text box?" Yes. "Using VBA option 'after update', Is it possible to redefine combobox row source if already bound ?" Yes. Now, if you want some examples of HOW to do those things.... Really simplistic approaches: Private Sub txtInPutBox_AfterUpdate() Me.ComboBox = txtInPutBox End Sub Unfortunately, "Using VBA option 'after update'..." isn't enough to go on. "After update" of "what" matters here.
Eugene-LS Registered User. Local time Today, 09:28 Joined Dec 7, 2018 Messages 512 Apr 8, 2022 #3 Shankar14 said: Using VBA option 'after update', Is it possible to redefine combobox row source if already bound ? Click to expand... Yes, it is possible. Code: Dim sRowSource As String sRowSource= "Select ... From ... " If Len(Me.txtFild & "" > 0 Then sRowSource= sRowSource & " Where [Your fied name] = '" & Me.txtFild & "'" End if Me.ComboBoxName.RowSource = sRowSource
Shankar14 said: Using VBA option 'after update', Is it possible to redefine combobox row source if already bound ? Click to expand... Yes, it is possible. Code: Dim sRowSource As String sRowSource= "Select ... From ... " If Len(Me.txtFild & "" > 0 Then sRowSource= sRowSource & " Where [Your fied name] = '" & Me.txtFild & "'" End if Me.ComboBoxName.RowSource = sRowSource