Hi I am using the following code so that I can filter the main form based on various unbound text boxes
Example of Filter code
Dim strWhere As String
more code
If Not IsNull(Me.txtFilterScheme) Then
strWhere = strWhere & "([Scheme] Like ""*" & Me.txtFilterScheme & "*"") AND "
End If
If Not IsNull(Me.txtFilterPhase) Then
strWhere = strWhere & "([Phase] Like ""*" & Me.txtFilterPhase & "*"") AND "
End If
More code
Me.Filter = strWhere
Me.FilterOn = True
Now I have a sub form so before I End Sub I have added
Me.SubFrmKAMElectricalTotalsFilterd.Form.RecordSource = "QryKAMElectricalTotalsFiltered"
Me.SubFrmKAMElectricalTotalsFilterd.Form.Filter = strWhere
Me.SubFrmKAMElectricalTotalsFilterd.Form.FilterOn = True
This works
What I would like to do is use a ListBox not a subform, is there a way of doing this as I don't see a Filter in the Properties of a ListBox.
Thanks for your help
CNEILL
Example of Filter code
Dim strWhere As String
more code
If Not IsNull(Me.txtFilterScheme) Then
strWhere = strWhere & "([Scheme] Like ""*" & Me.txtFilterScheme & "*"") AND "
End If
If Not IsNull(Me.txtFilterPhase) Then
strWhere = strWhere & "([Phase] Like ""*" & Me.txtFilterPhase & "*"") AND "
End If
More code
Me.Filter = strWhere
Me.FilterOn = True
Now I have a sub form so before I End Sub I have added
Me.SubFrmKAMElectricalTotalsFilterd.Form.RecordSource = "QryKAMElectricalTotalsFiltered"
Me.SubFrmKAMElectricalTotalsFilterd.Form.Filter = strWhere
Me.SubFrmKAMElectricalTotalsFilterd.Form.FilterOn = True
This works
What I would like to do is use a ListBox not a subform, is there a way of doing this as I don't see a Filter in the Properties of a ListBox.
Thanks for your help
CNEILL