Private Sub Command1_Click()

On Error Resume Next

Dim Tconnn As New ADODB.Connection

Dim trss As New ADODB.Recordset

'If Tconnn.State = 1 Then Tconnn.Close

'If trss.State = 1 Then trss.Close

'" & App.Path & "

Tconnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\社区管理软件\医院信息管理系统\forn.mdb;Persist Security Info=False;Jet OLEDB:Database Password=huang987654"

sql = "select * from user_gs where 患者姓名 Like '%" & Text1.Text & "%'"

trss.Open sql, Tconnn, 3, 3

If trss.RecordCount > 0 Then

End If

'    trss.AddNew  'id

'    trss.Fields("网址").Value = UserName

'    trss.Update

trss.Close: Tconnn.Close

Set trss = Nothing: Set Tconnn = Nothing

End Sub

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐