当查询有值时 并不会出错 可当无值时 系统就会弹出错误 请问要怎么解决?
Dim txt As String = e.Form.Controls("TextBox1").Text
With DataTables(e.form.name & "_Table1")
If txt = "" Then
.loadFilter = ""
Else
txt = "'%" & txt & "%'"
.loadFilter = "品牌类型 Like " & txt & " Or 品牌名称 Like " & txt
End If
.LoadPage = 0
.LoadTop=e.Form.Controls("ComboBox1").value
.load
'以下动态显示本表行数
Dim count = DataTables(e.Form.Name & "_Table1").sqlCompute("count([_identify])",.loadFilter) '统计行数
e.Form.Controls("Label6").text = "共" & count & "条数据"
'以下设置态动分页列表
Dim comvalue As String 'Combolist的变量值
Dim ttpages As String '分页最大值
ttpages = DataTables(e.Form.Name & "_Table1").TotalPages
For i As Integer =1 To ttpages
If i <> ttpages Then
comvalue =comvalue & i & "|"
Else
comvalue =comvalue & i
End If
Next
Dim cmb As WinForm.ComboBox = e.form.Controls("ComboBox2")
cmb.ComboList = comvalue
End With