what will i do if i want to have an input in vb using combo-box. And report generate thru CR. i have already code but it does not work. year always appear 1905.
startdate, enddate declared as STRING
startdate = combo1(0).Text
enddate = combo1(1).Text
startdate = Format(startdate, "mm/yyyy"
enddate = Format(enddate, "mm/yyyy"
CReport1.Formulas(0) = "From='" & startdate & "'"
CReport1.Formulas(1) = "To='" & enddate & "'"
CReport1.Destination = 0
CReport1.ReportFileName = (App.Path "\monthlyreport.rpt"
If Len(combo1(0).Text) And Len(combo1(1).Text) Then
strselectCriteria = "{Masterlist.BidDate} In Date (" & Format$(combo1(0).Text, "YYYY,MM,DD" & " To Date(" & Format$(combo1(1).Text, "YYYY,MM,DD" & ""
Else
strselectCriteria = ""
End If
CReport1.SelectionFormula = strselectCriteria
CReport1.DataFiles(0) = strDbName
CReport1.RetrieveDataFiles
CReport1.Action = 1
thank you for the help
startdate, enddate declared as STRING
startdate = combo1(0).Text
enddate = combo1(1).Text
startdate = Format(startdate, "mm/yyyy"
enddate = Format(enddate, "mm/yyyy"
CReport1.Formulas(0) = "From='" & startdate & "'"
CReport1.Formulas(1) = "To='" & enddate & "'"
CReport1.Destination = 0
CReport1.ReportFileName = (App.Path "\monthlyreport.rpt"
If Len(combo1(0).Text) And Len(combo1(1).Text) Then
strselectCriteria = "{Masterlist.BidDate} In Date (" & Format$(combo1(0).Text, "YYYY,MM,DD" & " To Date(" & Format$(combo1(1).Text, "YYYY,MM,DD" & ""
Else
strselectCriteria = ""
End If
CReport1.SelectionFormula = strselectCriteria
CReport1.DataFiles(0) = strDbName
CReport1.RetrieveDataFiles
CReport1.Action = 1
thank you for the help