现在是sql="select id,考试号,姓名,性别,分数,类别,录取专业,籍贯 from [data] where 考试号="&kaohao and 姓名=name
and 连接,家在后面就可以了
sql="select id,考试号,姓名,性别,分数,类别,录取专业,籍贯 from [data] where 考试号="&kaohao&" and 姓名='"&name&"'"
"where 考试号="&kaohao&" and 姓名='"&name&"'" ,如果是文本类型的记得加单引号
select id,考试号,姓名,性别,分数,类别,录取专业,籍贯 from [data] where 考试号=kaohao and 姓名=name