ado.Recordset.Closeado.Recordset.Open"select*fromdb1where准考证号='"+Txt1+"'"Ifado.Recordset.EOFThenMsgBox"数据库中没有你想查询的",16,"错误"ElseForm2.Txt1.Text=ado.Recordset.Fields("姓名").ValueForm2.Txt2.Text=ado.Records