唉 你在"and"的前面 多加一个空格吧
sql语句看起来没错,Combo1.Text 取出来的值是你选中的项的值吗?
Adodc1.RecordSource ="select * from 订餐管理 where 年='" + Combo1.Text + "' and 月='" + Combo2.Text + "' and 日='" + Combo3.Text + "'
注意空格!
Adodc1.RecordSource = "select * from 订餐管理 where 年='" + Combo1.Text.tostring()+ "' and 月='" + Combo2.Text.tostring() + "' and 日='" + Combo3.Text.tostring() + "'"
两个问题,
1、控件用Text.tostring()取字符串,比较规范。
2、你and命令少了空格。