下面是一段查询代码,用来查询招聘人数区间,如:招聘人数在5人以上40人以下的单位都查询出来。但结果是把40人以上的招聘单位查询出来了。代码明显有错误,但我不会修改,请高手帮忙修改。
With e.Form.Controls("招聘人数")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "招聘人数 >=" & .Value
End If
End With
With e.Form.Controls("招聘人数")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "招聘人数 >=" & .Value
End If
End With
With e.Form.Controls("招聘人数1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "招聘人数 >=" & .Value
End If
End With