1:
Adodc1.RecordSource = "SELECT * From 人员 Where 姓名='张三'"
Adodc1.Refresh
2:
Adodc1.RecordSource = "SELECT * From 人员 Where 姓别='男' And 部门='销售部'"
Adodc1.Refresh
举两个例子:
Adodc1.RecordSource = "SELECT * From 人员 Where 姓名='张三'"
Adodc1.Refresh
Adodc1.RecordSource = "SELECT * From 人员 Where 姓别='男' And 部门='销售部'"
Adodc1.Refresh
将where语句后的条件,用变量表达