I am opening up a recordset and trying to get all the records that match the current selected date from a combo box. The values in the combo are listed as:
January
February
March
...and so on...
The dates in the table are stored like this, 1/1/01 etc. I am trying to pull the matches with this but so far I have not been sucessful.
What am I doing wrong?
January
February
March
...and so on...
The dates in the table are stored like this, 1/1/01 etc. I am trying to pull the matches with this but so far I have not been sucessful.
Code:
Set rsMonths = CurrentDb.OpenRecordset("queLastReviewDate")
Do While Not rsMonths.EOF
strGetDate = Format(rsMonths("LastDate").Value, "m")
strDate = Me.cboMonth
If strDate = strGetDate Then
MsgBox (strDate & " " & strGetDate)
Else
MsgBox "Nothing to report"
Exit Sub
End If
What am I doing wrong?