How to generate data reports using two DTPicker's

Reply

Join Date: Sep 2008
Posts: 5
Reputation: sumeetpingale is an unknown quantity at this point 
Solved Threads: 0
sumeetpingale sumeetpingale is offline Offline
Newbie Poster

How to generate data reports using two DTPicker's

 
0
  #1
Jan 13th, 2009
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.....
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 5
Reputation: sumeetpingale is an unknown quantity at this point 
Solved Threads: 0
sumeetpingale sumeetpingale is offline Offline
Newbie Poster

Re: How to generate data reports using two DTPicker's

 
0
  #2
Jan 13th, 2009
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC