Click here to Skip to main content
15,913,773 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to print datareport between two dates. how its possible.

i wrote this command
VB
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.
Posted

1 solution

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.
 
Share this answer
 
Comments
zakariyaptpl 14-Jul-11 5:56am    
i am new in VB6 field sir,so i dont have enough knowledge about this.can you suggest me anyway to print the datareport between 2 days.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900