选择两个日期之间的数据报告

选择两个日期之间的数据报告

问题描述:

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

我写了这个命令

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.