读取TextBox所有内容
TextBox设置为Multiline,我需要每次输入多个数值进行查询,当我输入多个数值时如何读取所有数值进行匹配。谢谢!
[此贴子已经被作者于2022-4-17 12:17编辑过]
[此贴子已经被作者于2022-4-17 12:17编辑过]
2022-04-17 12:15
2022-04-17 22:10
2022-04-17 22:43
2022-04-24 21:34
程序代码:
Private Sub Command1_Click()
SQL = "select * from xx where 1=1"
arr = Split(Text1.Text, vbCrLf)
For Each i In arr
If Len(i) > 0 Then
SQL = SQL & " or pp='" & i & "'"
End If
Next
MsgBox SQL
End Sub
2022-04-24 23:17
2022-04-28 20:18
2022-04-28 21:54