i am getting an error when i use the following code

Dim x as date
ExDate = InputBox("Enter The Expiry Date")
x = CDate(ExDate)
CrystalReport.SelectionFormula = " month({qdefCredOIAPRep.EnteredDate})>0 and {qdefCredOIAPRep.EnteredDate}> x "

can anyone tell me the problem..please need help