Hello everybody,
I know this is a smal problem but it has buffled me for while. I would like to open report called "Miami Dade Garnishment " based on selection in list box called " Date QB" . The list box has only one row that is date in date format of dates that have been upload in Access . I looked up in forum and come up with this code but for some reason it doesn't work:
Dim stDocName As String
Dim Criteria As String
Dim i As Variant
stDocName = "Miami Dade Garnishment"
Criteria = ""
For Each i In Me![Date QB].ItemsSelected
If Criteria <> "" Then
Criteria = Criteria & " OR "
End If
Criteria = Criteria & "#[DateUploadQB]= #" _
& Me!
[List1].ItemData(i) & "'"
Next i
Debug.Print Criteria
DoCmd.OpenReport stDocName, acPreview, , Criteria
Me.Filter = Criteria
Me.FilterOn = True
The filed in the report that is DateUploadQB in date format as well.
Thank you in advance for help,
Regards,
GomelBoris