Please help me with a parameter report that allows one to input a month in words i.e. May, and displays values for that particular month only.
Regards,
Regards,
Private Sub cmdButton_Click()
Dim strFilter as string
Dim datStart As Date, datEnd As Date
datMonth = CDate(Me.txtMonth)
datEnd = DateAdd("m", 1, datStart) - 1
strFilter = "[DateField] Between " & _
Format(datStart, "\#d/m/yyyy\#") & _
" And " & _
Format(datEnd, "\#d/m/yyyy\#")
Call DoCmd.OpenReport(ReportName:="YourReport", _
WhereCondition:=strFilter)
End Sub
Comment