我也遇到这个问题了
Dim lb As WinForm.ComboBox = e.Form.Controls("类别")
Dim sycl As WinForm.ComboBox = e.Form.Controls("使用策略")
Dim ggxx As WinForm.TextBox = e.Form.Controls("规格")'规格下限
Dim ggsx As WinForm.TextBox = e.Form.Controls("上限") '规格上限
Dim gz As WinForm.RadioButton = e.Form.Controls("公制")
Dim yz As WinForm.RadioButton = e.Form.Controls("英制")
Dim gg As Single
Dim FilterA As String
Dim syclv As String
If ggxx.Text="下限" Then ggxx.text=Nothing
If ggsx.Text="上限" Then ggsx.text=Nothing
Dim lbv As String
If lb.text="" Then
lbv="*"
filterA="TCatg Like '*'"
Else
lbv=lb.Text
filtera="TCatg like '" & lb.text & "'"
End If
If gz.Checked Then
filtera=filtera & " and MMIN =true"
ElseIf yz.Checked Then
filtera=filtera & "And MMIN=false"
End If
If sycl.text<>"全部" Then
If sycl.Text <>"" Then
filtera=filtera & " and RMLC ='" & sycl.Text & "'"
End If
End If
If IsNumeric(ggxx.value) Then '规格下限为数值型
MessageBox.Show("暂停1: " & ggxx.value & ":" & ggsx.Value)
If ggxx.value>=0 Then
If ggsx.value>0 Then
MessageBox.Show("暂停2")
If ggxx.value>ggsx.value Then
MessageBox.Show("暂停3")
gg=ggxx.value
ggxx.value=ggsx.value '重置上下限
ggsx.value=gg
End If
Dim xx As Single=ggxx.value
Dim sx As Single=ggsx.value
filtera=filtera & " and [NorDiameter] >=" & xx & " And [NorDiameter] <= " & sx
MessageBox.Show("暂停5")
ElseIf ggsx.value Is Nothing Then
Dim xx As Single = ggxx.value
MessageBox.Show("暂停4")
filtera=filtera & " and NorDiameter=" & xx
End If
End If
ElseIf ggxx.text Is Nothing Then '字符型,如丝锥等
MessageBox.Show("暂停6B")
filtera=filtera & " and NorDiameter like '*" & ggxx.Text & "*'"
End If
MessageBox.Show("暂停7" & FilterA)
DataTables("ToolingTechList").AllowEdit=True
Tables("ToolingTechList").Filter=filterA
执行到filter时出现
[此贴子已经被作者于2018/5/4 15:34:54编辑过]