显示查询结果
Private Sub Command1_Click() If Option1 Then Text1.SetFocus
Set rs = New ADODB.Recordset Set conn = New ADODB.Connection conn.ConnectionString = "Driver={sql server};server=LIUMIAO;uid=sa;pwd=;database=vbsql" conn.ConnectionTimeout = 30 conn.Open SQL = "select * from newcard where sname='" & Trim(Text1.Text) & "'" Set rs = conn.Execute(SQL) 'rs.Open "select * from newcard where sname='" & Trim(Text1.Text) & "'" If rs.EOF = False Then Print Else MsgBox "该用户不存在!" End If End If Set rs = Nothing conn.Close End Sub 我没有使用任何控件,想显示查询结果. 运行时没报错,也没什么反应 该怎么显示出来呢?谢谢大家帮忙!