There is 2 parts to this.... help with either appreciated!
I have the following 3 combo boxes to filter 3 columns of data;
The first 2 work ok but the third gives me a Run-time error '3464': Data type mismatch in criteria expression.
Combo1 gets its selection from a list and Combo2&3 from 2 tables.
I cant see why combo 3 doesnt work?????
The second part is that they work independently of each other, ie when they update they don't consider the values in the other two combo boxes. How do I compile the code so updating from any combo box will consider all values when filtering.
In essence I just want to filter a continuous form with more than one combo box, such that blank combo boxes are not considered.
Thanks in adavance
I have the following 3 combo boxes to filter 3 columns of data;
Code:
Private Sub Combo116_AfterUpdate()
If IsNull(Me.Combo116) Then
Me.FilterOn = False
Else
Me.Filter = "BankLog = """ & Me.Combo116 & """"
Me.FilterOn = True
End If
End Sub
Private Sub Combo118_AfterUpdate()
If IsNull(Me.Combo118) Then
Me.FilterOn = False
Else
Me.Filter = "Team = """ & Me.Combo118 & """"
Me.FilterOn = True
End If
End Sub
Private Sub Combo154_AfterUpdate()
If IsNull(Me.Combo154) Then
Me.FilterOn = False
Else
Me.Filter = "Assigned = """ & Me.Combo154 & """"
Me.FilterOn = True
End If
End Sub
The first 2 work ok but the third gives me a Run-time error '3464': Data type mismatch in criteria expression.
Combo1 gets its selection from a list and Combo2&3 from 2 tables.
I cant see why combo 3 doesnt work?????
The second part is that they work independently of each other, ie when they update they don't consider the values in the other two combo boxes. How do I compile the code so updating from any combo box will consider all values when filtering.
In essence I just want to filter a continuous form with more than one combo box, such that blank combo boxes are not considered.
Thanks in adavance
Comment