Dim t As Table = currenttable
Dim tb As String = t.cols(t.colsel).name
Dim q As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim b As WinForm.ComboBox = e.Form.Controls("ComboBox2")
Dim s As WinForm.ComboBox = e.Form.Controls("ComboBox3")
Dim g As WinForm.ComboBox = e.Form.Controls("ComboBox4")
Dim qq As String = q.text
Dim bb As String = b.text
Dim ss As String = s.text
Dim gg As String = g.text
t.Filter = (tb & " like '%" & qq & "%' and " & tb & " like '%" & bb & "%' ")
t.Filter = (tb & " like '%" & ss & "%' and " & tb & " like '%" & gg & "%' ")
求助上面2段绿色代码合并,成下面黄色代码,报错如下:
从字符串“四和 like '%1%' and 四和 like '%1”到类型“Long”的转换无效。
输入字符串的格式不正确。
求助修复下面黄色代码
t.Filter = (tb & " like '%" & qq & "%' and " & tb & " like '%" & bb & "%' ") Or (tb & " Like '%" & ss & "%' and " & tb & " like '%" & gg & "%' ")
[此贴子已经被作者于2024/8/25 21:36:46编辑过]
t.Filter = "(" & tb & " like '%" & qq & "%' and " & tb & " like '%" & bb & "%' ) Or (" & tb & " Like '%" & ss & "%' and " & tb & " like '%" & gg & "%' )"