[此贴子已经被作者于2022-4-17 12:17编辑过]
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