Hi All.
I would like to filter different ListBoxes RowSource by value which differ by one day. For this I created a code
But when I ran the code I got an error. How to fix Tuesday and Wednesday ListBox filtering problem by increasing the filter value by 1 and 2 respectively?
Thanks
I would like to filter different ListBoxes RowSource by value which differ by one day. For this I created a code
Code:
Private Sub cmdFilter_Click()
Dim strFilter As String
strFilter = "CompDate = #" & Format(Me.txtFilter.Value, "mm/dd/YYYY") & "#"
Me.lbxMon.RowSource = "SELECT * FROM qDailyMON WHERE " & strFilter
Me.lbxTue.RowSource = "SELECT * FROM qDailyTUE WHERE " & strFilter + 1
Me.lbxWed.RowSource = "SELECT * FROM qDailyWED WHERE " & strFilter + 2
End Sub
Thanks
Last edited: