L
lilbit27
filter error:
One of my filters will not work the first time I run it but will when I
clear and re run.
Here is the code.
Dim stFilter As String
If NZ(Me.CboOpid) <> "" Then stFilter = stFilter & " And [opid] = '" &
Me.CboOpid & "'"
If NZ(Me.CboExclsn) <> "" Then stFilter = stFilter & " And [Excd] = '"
& Me.CboExclsn & "'"
If NZ(Me.CboProd) <> "" Then stFilter = stFilter & " And [ProdCd] = '"
& Me.CboProd & "'"
If NZ(Me.txtPolicy) <> "" Then stFilter = stFilter & " And [polNbr] =
'" & Me.txtPolicy & "'"
If Len(stFilter) > 0 Then stFilter = right(stFilter, Len(stFilter) - 4)
Me.FPastDues.Form.Filter = stFilter
Me.FPastDues.Form.FilterOn = True
When I try to find out the error I get this
me.fpastdues.form.filter="] = 'CC02'"
CC02 is one of the opids that I selected from a combo box to filter on.
Am I missing a quote or have it in the wrong place.
One of my filters will not work the first time I run it but will when I
clear and re run.
Here is the code.
Dim stFilter As String
If NZ(Me.CboOpid) <> "" Then stFilter = stFilter & " And [opid] = '" &
Me.CboOpid & "'"
If NZ(Me.CboExclsn) <> "" Then stFilter = stFilter & " And [Excd] = '"
& Me.CboExclsn & "'"
If NZ(Me.CboProd) <> "" Then stFilter = stFilter & " And [ProdCd] = '"
& Me.CboProd & "'"
If NZ(Me.txtPolicy) <> "" Then stFilter = stFilter & " And [polNbr] =
'" & Me.txtPolicy & "'"
If Len(stFilter) > 0 Then stFilter = right(stFilter, Len(stFilter) - 4)
Me.FPastDues.Form.Filter = stFilter
Me.FPastDues.Form.FilterOn = True
When I try to find out the error I get this
me.fpastdues.form.filter="] = 'CC02'"
CC02 is one of the opids that I selected from a combo box to filter on.
Am I missing a quote or have it in the wrong place.