老师,我的员工信息表中有年龄列,我建了两个NumericComboBox,分别是Num1 和Num2,想查询输入的某个年龄段的数据,套入以下代码无反应,
刚开始接触foxtablei很多不懂的,麻烦老师帮忙指导一下,谢谢
Tables("员工信息").Filter = ""
Dim Filter As String
With e.Form.Controls("Num1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "年龄 >= '" & .Value & "'"
End If
Tables("员工信息").Filter =Filter
End With
With e.Form.Controls("Num2")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "年龄 <= '" & .Value & "'"
End If
End With