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.

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

DataEnvironment1.rptrenewal X, Y
Unload DataEnvironment1
End If
Exit Sub
End Sub

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