Hi everyone,
I know this is similar to a post I've created before however things are slightly different now. Basically I have a form in splitform view and all i have right now is a search bar that filters based on what the user types in. However I would like to add a combo box with 2 column:
(I would post a screenshot but for some reason I keep getting asked to put the image's URL, which it doesn't have because it's a screenshot)
Codes on left and description on right. The columns are based off a separate table, however the codes appear on the datasheet in one of the columns. So if a user selects for example "1323" the datasheet would look for this value in that column and filter it based on the selection. If anyone has any insight on how to do this, that would be much appreciated.
****UPDATE****
So I've been playing around with this and I've included the combo box and here is the VBA for it:
The datasheet does filter, but very strangely. For example if I select '1323' in the combo box, the datasheet gives me some results, but none contain the value '1323'. Does anyone have any idea why this might be?
I know this is similar to a post I've created before however things are slightly different now. Basically I have a form in splitform view and all i have right now is a search bar that filters based on what the user types in. However I would like to add a combo box with 2 column:
(I would post a screenshot but for some reason I keep getting asked to put the image's URL, which it doesn't have because it's a screenshot)
Codes on left and description on right. The columns are based off a separate table, however the codes appear on the datasheet in one of the columns. So if a user selects for example "1323" the datasheet would look for this value in that column and filter it based on the selection. If anyone has any insight on how to do this, that would be much appreciated.
****UPDATE****
So I've been playing around with this and I've included the combo box and here is the VBA for it:
Code:
Private Sub Combo565_AfterUpdate()
'filter all values where cboFilter value is in Complete field string
Me.Filter = "InStr([Program(s)],""" & Me.Combo565.Value & """)"
' Debug.Print Me.Filter
Me.FilterOn = True
End Sub
The datasheet does filter, but very strangely. For example if I select '1323' in the combo box, the datasheet gives me some results, but none contain the value '1323'. Does anyone have any idea why this might be?
Last edited: