Office中国论坛/Access中国论坛
标题:
[求助]为什么此代码总是提示参数不足?
[打印本页]
作者:
lyf_898
时间:
2005-5-1 01:31
标题:
[求助]为什么此代码总是提示参数不足?
[attach]10230[/attach]
str = "SELECT 日迟到次数统计.姓名, Sum(日迟到次数统计.次数) AS 迟到早退次数," _
& "Sum(日迟到次数统计.旷工) AS 旷工次数 FROM 日迟到次数统计" _
& " GROUP BY 日迟到次数统计.姓名" _
& " HAVING(((日迟到次数统计.姓名) = [Forms]![frmLogin]![username]))"
Set aaa = CurrentDb.OpenRecordset(str, dbOpenSnapshot, dbReadOnly)
以上为什么总是提示参数不足、期待是......?该怎么修改?
[此贴子已经被作者于2005-5-1 14:06:37编辑过]
作者:
lyf_898
时间:
2005-5-1 01:43
str = "SELECT 日迟到次数统计.姓名, Sum(日迟到次数统计.次数) AS 迟到早退次数," _
& "Sum(日迟到次数统计.旷工) AS 旷工次数 FROM 日迟到次数统计" _
& " GROUP BY 日迟到次数统计.姓名" _
& " HAVING(((日迟到次数统计.姓名) = [Forms]![frmLogin]![username]))"
Set aaa = CurrentDb.OpenRecordset(str, dbOpenSnapshot, dbReadOnly)
但取消:HAVING(((日迟到次数统计.姓名) = [Forms]![frmLogin]![username]))
这句时运行是能正常运行的。
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3