DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Visual Basic 4 / 5 / 6 (http://www.daniweb.com/forums/forum4.html)
-   -   How to generate data reports using two DTPicker's (http://www.daniweb.com/forums/thread168022.html)

sumeetpingale Jan 13th, 2009 6:25 am
How to generate data reports using two DTPicker's
 
Hello,
I want to generate reports between two dates. So i am using two DTPicker to select StartDate and EndDate. So I have written some code for it. But it is not working.

[icode]
Private Sub cmdgenerate_Click()
Dim X As Variant
Dim Y As Variant
X = DTPickerstartdate.Value
Y = DTPickerenddate.Value

startdate = DateValue(DTPickerstartdate.Value)
enddate = DateValue(DTPickerenddate.Value)
DTPickerstartdate.Value = str(startdate)
DTPickerenddate.Value = str(enddate)
var = (enddate - startdate)
If var < 1 Then
MsgBox "Choose proper dates", vbExclamation
Else

DataEnvironment1.rptrenewal X, Y
rpt_renewal.Show
Unload DataEnvironment1
End If
Exit Sub
End Sub
[i/code]


I an having an error in "DataEnvironment1.rptrenewal X, Y", as Wrong number of argument invalid property assignment. Please help me out.....

sumeetpingale Jan 13th, 2009 9:42 am
Re: How to generate data reports using two DTPicker's
 
Thank you very much.. for helping me out..
But there is another problem for me.. How can i generate reports between specific dates? I am using two DTPicker's.


All times are GMT -4. The time now is 6:53 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC