此主题相关图片如下:11.png

输入盗窃能够模糊查询到两条信息
代码如下
Dim txt As String = e.Form.Controls("TextBox1").Text
Dim tbl As Table = Tables("法律法规")
If txt = "" Then
tbl.Filter = ""
Else
Dim filter As String = "1=1"
For Each s As String In txt.Split(" ")
Filter &= " and 罪名 Like '%" & s & "%' and 具体内容 Like '%" & s & "%'"
Next
tbl.filter = filter
End If
有没有办法将查询到的两行记录,自动转为两行文本呢?
此主题相关图片如下:11.png

下图代码实现当前行数据组合实现,有没有办法实现多行数据实现呢?每行数据间用;号区隔开
代码如下Dim txt As String = e.Form.Controls("TextBox1").Text
Dim tbl As Table = Tables("法律法规")
If txt = "" Then
tbl.Filter = ""
Else
Dim filter As String = "1=1"
For Each s As String In txt.Split(" ")
Filter &= " and 罪名 Like '%" & s & "%' and 具体内容 Like '%" & s & "%'"
Next
tbl.filter = filter
End If
Dim txt1 As WinForm.TextBox = e.Form.Controls("TextBox2")
Dim ab As Row=Tables("法律法规").Current
txt1.Text= ab("罪名") & ab("具体内容") & ab("法条")& ab("款项")& ab("法律名")& ab("发布时间")
[此贴子已经被作者于2019/2/13 17:25:44编辑过]