access 中vba执行嵌套查询的问题
If Me.ListTables = "db_抄表" Then strsql = "SELECT First(表号) As 表号段, First(抄表日期) As 抄表日期段,First(抄表时间) AS 抄表时间段, First(命令名称) As 命令名称段,First(抄表结果) As 抄表结果段 FROM (SELECT * FROM db_抄表 WHERE 命令名称 = '" & sx1_but & "' OR 命令名称 = '" & sx2_but & "') Tag GROUP BY 表号" Me.Child77.SourceObject = "表.db_抄表" Me.Child77.Form.RecordSource = strsql MsgBox strsql Exit Sub End If