G
Guest
I wonder who could help me with this? In the after update event of an Option
Group I've entered the following code:
Private Sub FilterBy_AfterUpdate()
With Me.[SubForm_BookLabels].Form
Select Case FilterBy
Case Is = 1 'this is for filtering by today's date
.Filter = "[date]= " & Date
.FilterOn = True
Case Is = 2 ' this is for filtering by all the dates equal or
after [DateToFilter]
.Filter = "[Date] >= " & Me.[DateToFilter]
.FilterOn = True
Case Is = 3 ' no filter at all
.FilterOn = False
End Select
Me![SubForm_BookLabels].Requery
End With
End Sub
The code doens't give me any error, but it seems that it doesn't filter by
date as it is expected to do.
I wonder what I did wrong,
Thank you
John
Group I've entered the following code:
Private Sub FilterBy_AfterUpdate()
With Me.[SubForm_BookLabels].Form
Select Case FilterBy
Case Is = 1 'this is for filtering by today's date
.Filter = "[date]= " & Date
.FilterOn = True
Case Is = 2 ' this is for filtering by all the dates equal or
after [DateToFilter]
.Filter = "[Date] >= " & Me.[DateToFilter]
.FilterOn = True
Case Is = 3 ' no filter at all
.FilterOn = False
End Select
Me![SubForm_BookLabels].Requery
End With
End Sub
The code doens't give me any error, but it seems that it doesn't filter by
date as it is expected to do.
I wonder what I did wrong,
Thank you
John