With e.Form.Controls("NumericComboBox1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & " 车号 = '" & .Value & "'"
End If
End With
With e.Form.Controls("NumericComboBox2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & " 标重 = '" & .Value & "'"
End If
End With
With e.Form.Controls("NumericComboBox3")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & " Convert(车号,'System.String') Like '%" & .Value & "%'"
End If
End With
With e.Form.Controls("TextBox4")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & " 备注 like '%" & .Value & "%'"
End If
End With
老师,我这段代码有问题吗?不过用起来还是得行。请您专业的把关一下,呵呵