VBA SQL语句表单参数不生成Value? [英] VBA SQL statement form parameter not generating Value?

查看:72
本文介绍了VBA SQL语句表单参数不生成Value?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码应该抓取PO Amt并使用表单中的日期参数对数据进行分组。但是,编码没有找到数据。如果表单中的日期参数被删除,代码将找到要分组的数据。


任何建议都将受到赞赏。


Mary

The following code is supposed to grab the PO Amt and group the data with the date parameters from a form. However, the coded finds no data. If the date parameter from the form is removed, the code will find data to group.

Any suggestions would be appreciated.

Mary

展开 | 选择 | Wrap | 行号

推荐答案

在您的HAVING子句中,您是否尝试过硬编码日期来查看如果它返回某些?

我不确定使用参数值,但通常,日期必须包含在#之间。其他明智的东西,如2010-03-04将做2010减去3减4 ...
in you HAVING clause, did you try putting hard coded dates to see if it returns someting?
I am not sure about using parameter values, but normally, dates must be enclosed between #. Other wise something like 2010-03-04 will do 2010 minus 3 minus 4...


是的,我测试了硬编码日期,它工作。但是,日期是可变的。
Yes, i tested with hard coded dates and it worked. however, the dates are variable.


定义strSQL之后,你可以放一行
After you define strSQL, can you put a line
展开 | 选择 | 换行 | 行号


这篇关于VBA SQL语句表单参数不生成Value?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆