选择两个日期之间的数据报告 [英] select datareport between two dates

查看:64
本文介绍了选择两个日期之间的数据报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在两个日期之间打印数据报告.怎么可能.

我写了这个命令

i want to print datareport between two dates. how its possible.

i wrote this command

DataEnvironment1.rsMycommand.Filter = " date>=# " & dtpicker1.value &" and date<=#" dtpicker2.value& "#" .i got this from one another site .

when i use this code its showing failed getting rowsets(s)from current data sourse.

please give me a solution.

推荐答案

不要盲目地从网络上复制代码,您应该尝试解决该问题,并了解您要复制的代码为何起作用或不起作用.您的数据库是什么,因为我从未见过日期的#语法.尝试将其删除.然后直接连接到您的数据库并运行您想要的SQL,该数据库将给出更好的错误.最后,如果您想盲目地从网上复制代码,这是停止使用VB6的另一个原因,它已经死了10年,总是很烂,并且没有真正的未来前景.
Instead of copying code blindly from the web, you should try to resolve the issue and learn why the code you''re copying works or does not work. What is your database, because I''ve never seen the # syntax for dates. Try removing it. Then connect to your DB directly and run your intended SQL, the DB will give better errors. Finally, if you like to copy code blindly off the web, that''s one more reason to stop using VB6, it''s been dead for 10 years, always sucked, and has no real future prospects.


这篇关于选择两个日期之间的数据报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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