|
Dim AQueryDef As QueryDef
Dim mydb As ADODB.Connection
Dim Rs As New ADODB.Recordset
Dim SQL As String
Dim Str As String
Set mydb = CurrentProject.Connection
SQL = "SELECT * from Tb_计划_主表 where 投入顺序>= " & Me.投入顺序 & ""
Rs.Open SQL, mydb, 3, 3
CurrentDb.QueryDefs.Refresh
Set AQueryDef = CurrentDb.QueryDefs("查询1")
Str = "between #" & Rs!投入日 & "# and #" & Rs!完成日 & "#"
AQueryDef.SQL = "SELECT Count(是否休息) AS 天数, 日期, 是否休息 FROM Tb_工厂日历 WHERE 日期 in (" & Str & ") GROUP BY 日期, 是否休息"
使用上面这段代码,运行到上面这句话,出现了如图错误,请帮我看看是什么问题。谢谢!
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|